From a05dfc915078559d87419c4df702abce80ed5d14 Mon Sep 17 00:00:00 2001 From: IOBYTE Date: Tue, 9 Jul 2019 10:04:22 -0400 Subject: [PATCH] fix daca codeblocks crash (#1968) * fix daca codeblocks crash * fix the cause of the missing scope --- cfg/wxwidgets.cfg | 2 +- lib/checkmemoryleak.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index e0e5cc43b..4756e4dd4 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -247,7 +247,7 @@ - + diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 23c6a1a8e..4cc10cf46 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -355,7 +355,7 @@ void CheckMemoryLeak::mismatchAllocDealloc(const std::list &calls CheckMemoryLeak::AllocType CheckMemoryLeak::functionReturnType(const Function* func, std::list *callstack) const { - if (!func || !func->hasBody()) + if (!func || !func->hasBody() || !func->functionScope) return No; // Get return pointer..