aboutsummaryrefslogtreecommitdiff
path: root/src/internal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal.cpp')
-rw-r--r--src/internal.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/internal.cpp b/src/internal.cpp
index 44246842..b4b7a683 100644
--- a/src/internal.cpp
+++ b/src/internal.cpp
@@ -491,9 +491,7 @@ void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION logf) {
passed as first arg at each call to the logger
******************************************************************************/
if (nullptr==ctx)
- pj_get_default_ctx ();
- if (nullptr==ctx)
- return;
+ ctx = pj_get_default_ctx ();
ctx->logger_app_data = app_data;
if (nullptr!=logf)
ctx->logger = logf;