Skip to content

Commit eb12029

Browse files
authored
Merge pull request #10742 from teijokinnunen/cthunk_free_fix
CThunk: Fix assertion when CThunk object is destroyed
2 parents b683f42 + aade299 commit eb12029

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

platform/CThunk.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ class CThunk: public CThunkBase {
6464

6565
~CThunk()
6666
{
67-
cthunk_free(_entry);
68-
_entry = NULL;
67+
if (_entry != NULL) {
68+
cthunk_free(_entry);
69+
_entry = NULL;
70+
}
6971
}
7072

7173
inline CThunk(T *instance, CCallbackSimple callback)

0 commit comments

Comments
 (0)