]> granicus.if.org Git - postgis/commitdiff
Fix for #1540: Fix segfault in shp2pgsql-gui when no port is specified. Prevent deref...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 5 Feb 2012 00:30:28 +0000 (00:30 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 5 Feb 2012 00:30:28 +0000 (00:30 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9032 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-gui.c

index aff28ff7afd9f656ac587873cd9f8ae53cac619c..92482dfd76a05aa6ca5ec6b5da15800971d5d7ea 100644 (file)
@@ -2455,7 +2455,7 @@ pgui_validate_connection()
 {
        int i;
        
-       if (strlen(conn->port))
+       if (conn->port && strlen(conn->port))
        {
                for (i = 0; i < strlen(conn->port); i++)
                {