aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pj_init.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index 1f09b0f2..fefcb8fa 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -668,11 +668,6 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
else
PIN->from_greenwich = 0.0;
- /* Private object for the geodesic functions */
- PIN->geod = pj_calloc (1, sizeof (struct geod_geodesic));
- if (0!=PIN->geod)
- geod_init(PIN->geod, PIN->a, (1 - sqrt (1 - PIN->es)));
-
/* projection specific initialization */
if (!(PIN = (*proj)(PIN)) || ctx->last_errno) {
bum_call: /* cleanup error return */
@@ -685,6 +680,12 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
}
PIN = 0;
}
+ else {
+ /* Private object for the geodesic functions */
+ PIN->geod = pj_calloc (1, sizeof (struct geod_geodesic));
+ if (0!=PIN->geod)
+ geod_init(PIN->geod, PIN->a, (1 - sqrt (1 - PIN->es)));
+ }
return PIN;
}