summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2019-02-05 12:44:09 +0100
committerBastien Nocera <hadess@hadess.net>2019-02-06 22:14:30 +0100
commitbf2175bbaf33e69fe67b2669e05c41ca71d9118c (patch)
tree5b5d0131a8e4dcd796490eb31070749e4f52fda3
parent1dbd93aa661a8d0a3b46c367a4950438cac6e365 (diff)
downloadtotem-gnome-3-26.tar.gz
save-file: Fix crash on exit in Flatpakgnome-3-26
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.
-rw-r--r--src/plugins/save-file/totem-save-file.c4
1 files changed, 4 insertions, 0 deletions
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);