From 2a5c0d1ee5ddfec1f1d93180223b20b86e5c39e3 Mon Sep 17 00:00:00 2001 From: Dawid Drozd Date: Tue, 8 Nov 2016 17:55:59 +0100 Subject: [PATCH] Fix bug _callbacks[notification.tag] creates new entry so in destructor we fail on assert --- src/Notifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Notifier.h b/src/Notifier.h index e978446..31840fc 100644 --- a/src/Notifier.h +++ b/src/Notifier.h @@ -123,7 +123,7 @@ public: using CallbackType = typename notification_traits::callback_type; assert(notification.tag > NotificationConst::UNUSED_TAG); - if (_callbacks[notification.tag] == nullptr) + if (_callbacks.find(notification.tag) == _callbacks.end()) { return; }