mirror of
https://github.com/espressif/arduino-esp32
synced 2024-09-21 02:18:29 +00:00
fix(events): Fix crash in getStdFunctionAddress (#10321)
This commit is contained in:
parent
4e9eb35752
commit
eda6d21d87
@ -228,7 +228,10 @@ void NetworkEvents::removeEvent(NetworkEventCb cbEvent, arduino_event_id_t event
|
||||
template<typename T, typename... U> static size_t getStdFunctionAddress(std::function<T(U...)> f) {
|
||||
typedef T(fnType)(U...);
|
||||
fnType **fnPointer = f.template target<fnType *>();
|
||||
return (size_t)*fnPointer;
|
||||
if (fnPointer != nullptr) {
|
||||
return (size_t)*fnPointer;
|
||||
}
|
||||
return (size_t)fnPointer;
|
||||
}
|
||||
|
||||
void NetworkEvents::removeEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event) {
|
||||
|
Loading…
Reference in New Issue
Block a user