Commit d4d692b7 authored by Paul Ramsey's avatar Paul Ramsey

Catch Proj null returns in lwerror


git-svn-id: http://svn.osgeo.org/postgis/trunk@17286 b70326c6-7e19-0410-871a-916f4a2858ee
parent 29778af3
Pipeline #49531613 passed with stage
in 30 minutes and 50 seconds
......@@ -304,14 +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);
if (!pj_horiz_crs) lwerror("%s: proj_crs_get_sub_crs returned NULL", __func__);
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);
if (!pj_src_crs) lwerror("%s: proj_get_source_crs returned NULL", __func__);
pj_cs = proj_crs_get_coordinate_system(NULL, pj_src_crs);
proj_destroy(pj_src_crs);
}
......@@ -319,7 +319,7 @@ proj_crs_is_swapped(const PJ* pj_crs)
{
pj_cs = proj_crs_get_coordinate_system(NULL, pj_crs);
}
assert(pj_cs);
if (!pj_cs) lwerror("%s: proj_crs_get_coordinate_system returned NULL", __func__);
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