forked from AuroraMiddleware/gtk
widget: Avoid critical warnings when disconnecting plain GtkEventControllers
This signal is only set on GtkGesture objects, so check it's really there before disconnecting.
This commit is contained in:
parent
66d2c9e6fa
commit
4d524ab469
@ -17500,7 +17500,9 @@ _gtk_widget_remove_controller (GtkWidget *widget,
|
|||||||
if (g_signal_handler_is_connected (widget, data->grab_notify_id))
|
if (g_signal_handler_is_connected (widget, data->grab_notify_id))
|
||||||
g_signal_handler_disconnect (widget, data->grab_notify_id);
|
g_signal_handler_disconnect (widget, data->grab_notify_id);
|
||||||
|
|
||||||
g_signal_handler_disconnect (data->controller, data->sequence_state_changed_id);
|
if (data->sequence_state_changed_id)
|
||||||
|
g_signal_handler_disconnect (data->controller, data->sequence_state_changed_id);
|
||||||
|
|
||||||
data->controller = NULL;
|
data->controller = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user