aboutsummaryrefslogtreecommitdiff
path: root/src/pj_init.c
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2018-02-10 18:52:05 +0100
committerGitHub <noreply@github.com>2018-02-10 18:52:05 +0100
commitc99cf890e3ce13ddc5cfaae092851ccf77182ea3 (patch)
treecbb0283b16e8e2dc8ebe7c79dfee6bc22d2e065d /src/pj_init.c
parent3b9505243e3da8a47aae10bbc294740f01362e7f (diff)
parent75fca1c0e2fdd58d997ff962936888b6f983e8ec (diff)
downloadPROJ-c99cf890e3ce13ddc5cfaae092851ccf77182ea3.tar.gz
PROJ-c99cf890e3ce13ddc5cfaae092851ccf77182ea3.zip
Merge pull request #786 from busstoptaktik/interdependent-wrap-ups
Interdependent wrap ups
Diffstat (limited to 'src/pj_init.c')
-rw-r--r--src/pj_init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index 0acc6c71..f54a2a92 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -593,12 +593,12 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
if (pj_datum_set(ctx, start, PIN))
return pj_default_destructor (PIN, proj_errno(PIN));
- if (PIN->need_ellps) {
- int ret = pj_ellipsoid (PIN);
- if (0 != ret) {
- pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere");
- return pj_default_destructor (PIN, proj_errno(PIN));
- }
+ err = pj_ellipsoid (PIN);
+ if (PIN->need_ellps && 0 != err) {
+ pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere");
+ return pj_default_destructor (PIN, proj_errno(PIN));
+ }
+ if (0==err) {
PIN->a_orig = PIN->a;
PIN->es_orig = PIN->es;
if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es))