widget: Make sure we only run controllers on realized widgets

The default event bubbling paths are prone to just running event controllers
even after the widget was potentially unrealized/destroyed in an event
handler callback, so bail out early if that's the case.

https://bugzilla.gnome.org/show_bug.cgi?id=755352
This commit is contained in:
Carlos Garnacho 2015-09-21 15:09:32 +02:00
parent defa1e9c0d
commit b323252c14

View File

@ -7309,6 +7309,9 @@ _gtk_widget_run_controllers (GtkWidget *widget,
{
GList *next = l->next;
if (!WIDGET_REALIZED_FOR_EVENT (widget, event))
break;
data = l->data;
if (data->controller == NULL)