Markus Metz пре 4 година
родитељ
комит
d1b80c8acb
1 измењених фајлова са 2 додато и 1 уклоњено
  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;
 }