Skip to content
Permalink
Browse files

pj_transform(): fix crash with z == NULL if vertical grid shift is re…

…quired (#292)
  • Loading branch information...
rouault committed Aug 25, 2015
1 parent 6c16367 commit 5d2af3a89be0898458e4f0fe272affc36642d304
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/pj_transform.c
@@ -208,7 +208,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
/* Do we need to translate from geoid to ellipsoidal vertical */
/* datum? */
/* -------------------------------------------------------------------- */
if( srcdefn->has_geoid_vgrids )
if( srcdefn->has_geoid_vgrids && z != NULL )
{
if( pj_apply_vgridshift( srcdefn, "sgeoidgrids",
&(srcdefn->vgridlist_geoid),
@@ -233,7 +233,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
/* Do we need to translate from geoid to ellipsoidal vertical */
/* datum? */
/* -------------------------------------------------------------------- */
if( dstdefn->has_geoid_vgrids )
if( dstdefn->has_geoid_vgrids && z != NULL )
{
if( pj_apply_vgridshift( dstdefn, "sgeoidgrids",
&(dstdefn->vgridlist_geoid),

0 comments on commit 5d2af3a

Please sign in to comment.
You can’t perform that action at this time.