summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-02 08:31:39 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-02 08:31:39 (GMT)
commit67cf8daa6d43205c3b6ecc98da8e10c196c741bd (patch)
tree0fb2bdf9209027296132d164cce593c8efca5c55 /SwifTools/Notifier/SnarlNotifier.cpp
parentb27133205a1c1220d8c82f1e87a68a8b6fd2c644 (diff)
downloadswift-67cf8daa6d43205c3b6ecc98da8e10c196c741bd.zip
swift-67cf8daa6d43205c3b6ecc98da8e10c196c741bd.tar.bz2
Do not crash when clicking system message notifications.
Resolves: #818
Diffstat (limited to 'SwifTools/Notifier/SnarlNotifier.cpp')
-rw-r--r--SwifTools/Notifier/SnarlNotifier.cpp2
1 files changed, 1 insertions, 1 deletions
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);