浏览代码

libproj: fix support for PROJ6

Markus Metz 6 年之前
父节点
当前提交
7c3e8de11b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/proj/do_proj.c

+ 2 - 2
lib/proj/do_proj.c

@@ -130,8 +130,6 @@ int GPJ_init_transform(const struct pj_info *info_in,
 		G_warning(_("proj_create_crs_to_crs() failed for '%s' and '%s'"),
 		          insrid, outsrid);
 	    }
-	    G_free(insrid);
-	    G_free(outsrid);
 #if PROJ_VERSION_MAJOR >= 6
 	    else {
 		const char *str = proj_as_proj_string(NULL, info_trans->pj,
@@ -141,6 +139,8 @@ int GPJ_init_transform(const struct pj_info *info_in,
 		    info_trans->def = G_store(str);
 	    }
 #endif
+	    G_free(insrid);
+	    G_free(outsrid);
 	}
 	if (info_trans->pj == NULL) {
 	    /* PROJ6+: enforce axis order easting, northing