Skip to content

Commit a05dfc9

Browse files
IOBYTEdanmar
authored andcommitted
fix daca codeblocks crash (danmar#1968)
* fix daca codeblocks crash * fix the cause of the missing scope
1 parent 9b1066f commit a05dfc9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cfg/wxwidgets.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
<define name="DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value)" value=""/>
248248
<define name="DECLARE_EVENT_TYPE(name, value)" value=""/>
249249
<define name="DECLARE_LOCAL_EVENT_TYPE(name, value)" value=""/>
250-
<define name="DEFINE_EVENT_TYPE(name)" value="const wxEventType name = wxNewEventType()"/>
250+
<define name="DEFINE_EVENT_TYPE(name)" value="const wxEventType name = wxNewEventType();"/>
251251
<define name="DEFINE_LOCAL_EVENT_TYPE(name)" value=""/>
252252
<define name="WX_DECLARE_STRING_HASH_MAP(name, value)" value=""/>
253253
<define name="DECLARE_LOCAL_EVENT_TYPE(name, value)" value=""/>

lib/checkmemoryleak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void CheckMemoryLeak::mismatchAllocDealloc(const std::list<const Token *> &calls
355355

356356
CheckMemoryLeak::AllocType CheckMemoryLeak::functionReturnType(const Function* func, std::list<const Function*> *callstack) const
357357
{
358-
if (!func || !func->hasBody())
358+
if (!func || !func->hasBody() || !func->functionScope)
359359
return No;
360360

361361
// Get return pointer..

0 commit comments

Comments
 (0)