aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/4D_api.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp
index ba292262..013a4628 100644
--- a/src/4D_api.cpp
+++ b/src/4D_api.cpp
@@ -602,6 +602,11 @@ PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) {
}
argv = pj_trim_argv (argc, args);
+ if (!argv) {
+ pj_dealloc(args);
+ proj_context_errno_set(ctx, ENOMEM);
+ return nullptr;
+ }
/* ...and let pj_init_ctx do the hard work */
/* New interface: forbid init=epsg:XXXX syntax by default */