aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-11-26 13:04:33 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-11-26 13:04:33 +0100
commitdf306f9800b1d6f7a1984877f090c1bc810da7a0 (patch)
treecb53756da8eb7500373c0b1e271920e379978367 /src
parent16432022a82ecbf22802680d42bf9adacefef6da (diff)
downloadPROJ-df306f9800b1d6f7a1984877f090c1bc810da7a0.tar.gz
PROJ-df306f9800b1d6f7a1984877f090c1bc810da7a0.zip
pj_ctx_set_debug(): avoid null pointer dereference when called with ctx == NULL. Found by cppcheck
Diffstat (limited to 'src')
-rw-r--r--src/pj_ctx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pj_ctx.c b/src/pj_ctx.c
index a8edaf43..326249ac 100644
--- a/src/pj_ctx.c
+++ b/src/pj_ctx.c
@@ -159,7 +159,7 @@ void pj_ctx_set_debug( projCtx ctx, int new_debug )
{
if (0==ctx)
- pj_get_default_ctx ()->debug_level = new_debug;
+ return;
ctx->debug_level = new_debug;
}