From 0f0172bc0d5a789cc9dd6a5bf0f9a44298fe53e8 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 19 Nov 2012 19:48:50 +0000 Subject: [PATCH] Fix possible NULL dereference git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13915 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/d.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Modules/d.cxx b/Source/Modules/d.cxx index 0f6a75255..2c8524dfe 100644 --- a/Source/Modules/d.cxx +++ b/Source/Modules/d.cxx @@ -3669,7 +3669,9 @@ private: bool inProxyModule(const String *type_name) const { if (!split_proxy_dmodule) { String *nspace = createOuterNamespaceNames(type_name); - bool result = (getNSpace() || !nspace) && (Strcmp(nspace, getNSpace()) == 0); + bool result = false; + if (getNSpace() && nspace) + result = (Strcmp(nspace, getNSpace()) == 0); Delete(nspace); return result; }