Browse Source

g.proj: fix segault issue #1163 (#1170)

Markus Metz 4 years ago
parent
commit
d4bac3bddc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      general/g.proj/input.c

+ 2 - 1
general/g.proj/input.c

@@ -471,10 +471,11 @@ int input_georef(char *geofile)
 		  geofile);
 
     set_authnamecode(hSRS);
-    OSRDestroySpatialReference(hSRS);
 
     if (ogr_ds)
 	OGR_DS_Destroy(ogr_ds);
+    else
+	OSRDestroySpatialReference(hSRS);
 
     return ret;
 }