mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
input-settings: Disconnect device signals on dispose
The input settings constructor installs callback functions on device added/remove and tool-changed. However, on dispose, those signals are not disconnected, meaning that on teardown, once the devices get removed eventually, the callback will still fire and call the callback with freed data, causing a crash. Make sure we clear the signals on devices on dispose, to avoid the crash on teardown. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1438
This commit is contained in:
parent
b5749a8b27
commit
c956193d09
@ -153,6 +153,8 @@ meta_input_settings_dispose (GObject *object)
|
||||
MetaInputSettings *settings = META_INPUT_SETTINGS (object);
|
||||
MetaInputSettingsPrivate *priv = meta_input_settings_get_instance_private (settings);
|
||||
|
||||
g_signal_handlers_disconnect_by_data (priv->seat, settings);
|
||||
|
||||
g_clear_object (&priv->virtual_pad_keyboard);
|
||||
|
||||
g_clear_object (&priv->mouse_settings);
|
||||
|
Loading…
Reference in New Issue
Block a user