diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-03-27 07:35:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 07:35:32 +0100 |
| commit | cc0326748ba04cac6d9409543e6fad112bca36b6 (patch) | |
| tree | a422e160995a0ecb117e145d7b48e77e975a1d4c /src/apply_vgridshift.cpp | |
| parent | 4754220ec8e3febd3d96e8096df8291c7a78fdb1 (diff) | |
| parent | c05a91da2e9e008d77bd148d4de62045f9f149c8 (diff) | |
| download | PROJ-cc0326748ba04cac6d9409543e6fad112bca36b6.tar.gz PROJ-cc0326748ba04cac6d9409543e6fad112bca36b6.zip | |
Merge pull request #1373 from rouault/coverity_fixes
Coverity fixes
Diffstat (limited to 'src/apply_vgridshift.cpp')
| -rw-r--r-- | src/apply_vgridshift.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/apply_vgridshift.cpp b/src/apply_vgridshift.cpp index ae23e39a..9be65f08 100644 --- a/src/apply_vgridshift.cpp +++ b/src/apply_vgridshift.cpp @@ -98,10 +98,13 @@ static double read_vgrid_value( PJ *defn, PJ_LP input, double vmultiplier, int * } /* load the grid shift info if we don't have it. */ - if( ct->cvs == nullptr && !pj_gridinfo_load( pj_get_ctx(defn), gi ) ) + if( ct->cvs == nullptr ) { - pj_ctx_set_errno( defn->ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); - return PJD_ERR_FAILED_TO_LOAD_GRID; + if( !pj_gridinfo_load( pj_get_ctx(defn), gi ) || ct->cvs == nullptr ) + { + pj_ctx_set_errno( defn->ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); + return PJD_ERR_FAILED_TO_LOAD_GRID; + } } |
