summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Notifier')
-rw-r--r--SwifTools/Notifier/GrowlNotifier.cpp2
-rw-r--r--SwifTools/Notifier/SnarlNotifier.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/SwifTools/Notifier/GrowlNotifier.cpp b/SwifTools/Notifier/GrowlNotifier.cpp
index 5ecd34c..e289313 100644
--- a/SwifTools/Notifier/GrowlNotifier.cpp
+++ b/SwifTools/Notifier/GrowlNotifier.cpp
@@ -31,7 +31,7 @@ namespace {
assert(CFDataGetLength(growlContextData) == sizeof(Context));
CFDataGetBytes(growlContextData, CFRangeMake(0, CFDataGetLength(growlContextData)), (UInt8*) &context);
- if (activateCallback) {
+ if (activateCallback && !context.callback->empty()) {
(*context.callback)();
}
delete context.callback;
diff --git a/SwifTools/Notifier/SnarlNotifier.cpp b/SwifTools/Notifier/SnarlNotifier.cpp
index e93a539..d891e7d 100644
--- a/SwifTools/Notifier/SnarlNotifier.cpp
+++ b/SwifTools/Notifier/SnarlNotifier.cpp
@@ -58,7 +58,7 @@ void SnarlNotifier::handleMessageReceived(MSG* message) {
int notificationID = message->lParam;
NotificationsMap::iterator i = notifications.find(notificationID);
if (i != notifications.end()) {
- if (action == Snarl::V41::SnarlEnums::NotificationAck) {
+ if (action == Snarl::V41::SnarlEnums::NotificationAck && !i->second.empty()) {
i->second();
}
notifications.erase(i);