GNOME Bugzilla – Bug 695122
Fix crash in NotificationBar::cancel() on exit
Last modified: 2016-03-31 13:22:07 UTC
When exiting Boxes while a notification is shown (I tried with the oVirt authentication popup), Boxes segfaults in NotificationBar::cancel(). NotificationBar::cancel() is iterating over the list of active notifications and calling gtk_widget_destroy() on them. GdNotification::destroy() is emitting the GdNotification::discarded signal, which NotificationBar catches to remove the current notification from the list of active notifications. After calling gtk_widget_destroy(), NotificationBar::cancel() tries to remove the current notification from the active notifications, which is useless as this was just done in the callback for NotificationBar::dismissed. Even worse, this caused a crash in my testing as active_notifications only contained 1 item, so it was empty after destroying the widget, and active_notifications.remove (active_notifications.data); would attempt to dereference a NULL pointer, causing a crash.
Created attachment 237975 [details] [review] Fix crash in NotificationBar::cancel() on exit
Review of attachment 237975 [details] [review]: ACK
Attachment 237975 [details] pushed as 0534e53 - Fix crash in NotificationBar::cancel() on exit