Fixed a crash in the processing of the notification queue

This commit is contained in:
Patrick von Reth 2014-02-26 11:01:41 +01:00
parent b1f2f1929d
commit 5afad635c3

View File

@ -112,14 +112,16 @@ void SnoreNotifier::slotProcessQueue()
{ {
foreach (NotifyWidget *w, m_widgets) foreach (NotifyWidget *w, m_widgets)
{ {
bool free = false;
if(w->acquire()) if(w->acquire())
{ {
Notification notification = m_queue.takeFirst(); Notification notification = m_queue.takeFirst();
w->display(notification); w->display(notification);
notification.hints().setPrivateValue(this, "id", w->id()); notification.hints().setPrivateValue(this, "id", w->id());
startTimeout(notification); startTimeout(notification);
free = true; if(m_queue.isEmpty())
{
return;
}
} }
} }
} }