Fixing notification dequeing.

This commit is contained in:
Ben Vanik
2015-06-02 22:12:00 -07:00
parent e186fcaf0d
commit 7f62e8a86d
3 changed files with 5 additions and 1 deletions

View File

@@ -77,9 +77,9 @@ bool XNotifyListener::DequeueNotification(XNotificationID id,
std::lock_guard<xe::mutex> lock(lock_);
bool dequeued = false;
if (notification_count_) {
dequeued = true;
auto it = notifications_.find(id);
if (it != notifications_.end()) {
dequeued = true;
*out_data = it->second;
notifications_.erase(it);
notification_count_--;