[totem/gnome-3-30] save-file: Fix crash on exit in Flatpak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-30] save-file: Fix crash on exit in Flatpak
- Date: Wed, 6 Feb 2019 21:14:18 +0000 (UTC)
commit 305976514692b65c30b4f5a45fba83007c24c012
Author: Bastien Nocera <hadess hadess net>
Date: Tue Feb 5 12:44:09 2019 +0100
save-file: Fix crash on exit in Flatpak
When the nautilus binary isn't available (like in a Flatpak),
save-file's impl_activate() exits early. impl_deactivate() didn't check
whether the activation exited early and tried to disconnect signals on
NULL objects, caused a crash.
src/plugins/save-file/totem-save-file.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/save-file/totem-save-file.c b/src/plugins/save-file/totem-save-file.c
index 2700e5c16..65c37fd44 100644
--- a/src/plugins/save-file/totem-save-file.c
+++ b/src/plugins/save-file/totem-save-file.c
@@ -379,6 +379,10 @@ impl_deactivate (PeasActivatable *plugin)
TotemSaveFilePlugin *pi = TOTEM_SAVE_FILE_PLUGIN (plugin);
TotemSaveFilePluginPrivate *priv = pi->priv;
+ /* impl_activate() exited early */
+ if (priv->totem == NULL)
+ return;
+
g_signal_handlers_disconnect_by_func (priv->totem, totem_save_file_file_opened, plugin);
g_signal_handlers_disconnect_by_func (priv->totem, totem_save_file_file_closed, plugin);
g_signal_handlers_disconnect_by_func (priv->bvw, totem_save_file_download_filename, plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]