]> granicus.if.org Git - postgis/commitdiff
Fix pgsql2shp crash when dumping a table without a geo column.
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Fri, 3 Feb 2012 21:04:08 +0000 (21:04 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Fri, 3 Feb 2012 21:04:08 +0000 (21:04 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9021 b70326c6-7e19-0410-871a-916f4a2858ee

loader/pgsql2shp-core.c

index 6a8166c74c24652d26c120941cec788accbb7bd4..3ec92d53a85ed8227d7aa608fc82b7f5cc14ba2d 100644 (file)
@@ -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;
                }
        }