Merge pull request #10742 from teijokinnunen/cthunk_free_fix

CThunk: Fix assertion when CThunk object is destroyed
pull/10776/head
Martin Kojtal 2019-06-09 18:16:56 +01:00 committed by GitHub
commit eb12029215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -64,9 +64,11 @@ public:
~CThunk() ~CThunk()
{ {
if (_entry != NULL) {
cthunk_free(_entry); cthunk_free(_entry);
_entry = NULL; _entry = NULL;
} }
}
inline CThunk(T *instance, CCallbackSimple callback) inline CThunk(T *instance, CCallbackSimple callback)
{ {