mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-26 18:51:02 +08:00
Fix bug
_callbacks[notification.tag] creates new entry so in destructor we fail on assert
This commit is contained in:
parent
d44c38d24e
commit
2a5c0d1ee5
@ -123,7 +123,7 @@ public:
|
||||
using CallbackType = typename notification_traits<NotificationType>::callback_type;
|
||||
assert(notification.tag > NotificationConst::UNUSED_TAG);
|
||||
|
||||
if (_callbacks[notification.tag] == nullptr)
|
||||
if (_callbacks.find(notification.tag) == _callbacks.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user