Commit 29778af3 authored by Paul Ramsey's avatar Paul Ramsey

Hm, every proj call really needs a NULL guard :/


git-svn-id: http://svn.osgeo.org/postgis/trunk@17285 b70326c6-7e19-0410-871a-916f4a2858ee
parent e9fb50cc
Pipeline #49517358 passed with stage
in 33 minutes and 49 seconds
......@@ -304,12 +304,14 @@ proj_crs_is_swapped(const PJ* pj_crs)
if (proj_get_type(pj_crs) == PJ_TYPE_COMPOUND_CRS)
{
PJ *pj_horiz_crs = proj_crs_get_sub_crs(NULL, pj_crs, 0);
assert(pj_horiz_crs);
pj_cs = proj_crs_get_coordinate_system(NULL, pj_horiz_crs);
proj_destroy(pj_horiz_crs);
}
else if (proj_get_type(pj_crs) == PJ_TYPE_BOUND_CRS)
{
PJ *pj_src_crs = proj_get_source_crs(NULL, pj_crs);
assert(pj_src_crs);
pj_cs = proj_crs_get_coordinate_system(NULL, pj_src_crs);
proj_destroy(pj_src_crs);
}
......@@ -317,6 +319,7 @@ proj_crs_is_swapped(const PJ* pj_crs)
{
pj_cs = proj_crs_get_coordinate_system(NULL, pj_crs);
}
assert(pj_cs);
int axis_count = proj_cs_get_axis_count(NULL, pj_cs);
if (axis_count > 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment