From 38f7a68edbb0a5d4a64d98b8297f4281a5d400d0 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 27 Feb 2019 06:04:31 -0500 Subject: Fix default context fallback in proj_log_func. --- src/internal.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/internal.cpp') 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; -- cgit v1.2.3