From: Mark Cave-Ayland Date: Fri, 3 Feb 2012 21:04:08 +0000 (+0000) Subject: Fix pgsql2shp crash when dumping a table without a geo column. X-Git-Tag: 2.0.0alpha4~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d4cd0ce7bcb31975c4a8a602d80df420397ade2;p=postgis Fix pgsql2shp crash when dumping a table without a geo column. git-svn-id: http://svn.osgeo.org/postgis/trunk@9021 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/pgsql2shp-core.c b/loader/pgsql2shp-core.c index 6a8166c74..3ec92d53a 100644 --- a/loader/pgsql2shp-core.c +++ b/loader/pgsql2shp-core.c @@ -1870,6 +1870,8 @@ ShpDumperOpenTable(SHPDUMPERSTATE *state) snprintf(buf, 256, _("No geometry column found.\nThe DBF file will be created but not the shx or shp files.\n")); strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message)); + state->shp = NULL; + ret = SHPDUMPERWARN; } }