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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue