aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/malloc.cpp')
-rw-r--r--src/malloc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/malloc.cpp b/src/malloc.cpp
index 0e80912e..a14b1727 100644
--- a/src/malloc.cpp
+++ b/src/malloc.cpp
@@ -180,7 +180,7 @@ void *pj_dealloc_params (PJ_CONTEXT *ctx, paralist *start, int errlev) {
/************************************************************************/
void pj_free(PJ *P) {
- if (nullptr==P)
+ if (nullptr==P || !P->destructor)
return;
/* free projection parameters - all the hard work is done by */
/* pj_default_destructor, which is supposed */