mirror of https://github.com/ARMmbed/mbed-os.git
CThunk: Fix assertion when CThunk object is destroyed
In case the CThunk object is deleted without having called the entry() function (and thus _entry is NULL), cthunk_free_real() will fail with an assertion.pull/11023/head
parent
b421ca6fcc
commit
62c2f38017
|
@ -64,8 +64,10 @@ public:
|
||||||
|
|
||||||
~CThunk()
|
~CThunk()
|
||||||
{
|
{
|
||||||
cthunk_free(_entry);
|
if (_entry != NULL) {
|
||||||
_entry = NULL;
|
cthunk_free(_entry);
|
||||||
|
_entry = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline CThunk(T *instance, CCallbackSimple callback)
|
inline CThunk(T *instance, CCallbackSimple callback)
|
||||||
|
|
Loading…
Reference in New Issue