From 0ffdfa88ee21c533e2b3f3627c088ca12fc661d2 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Mon, 4 Sep 2017 16:05:06 +0200 Subject: [PATCH] Call event handler only if event-label matches Signed-off-by: Marcus Fritzsch --- AFBClient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AFBClient.cpp b/AFBClient.cpp index 99f22bd..cee49ad 100644 --- a/AFBClient.cpp +++ b/AFBClient.cpp @@ -403,7 +403,9 @@ void AFBClient::Impl::event(char const *et, char const *label) { auto i = this->handlers.find(oet.second); if (i != this->handlers.end()) { - i->second(label); + if (this->labels.find(label) != this->labels.end()) { + i->second(label); + } } } -- 2.16.6