[totem/wip/hadess/save-file-fixes: 1/6] save-file: Fix crash on exit in Flatpak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/save-file-fixes: 1/6] save-file: Fix crash on exit in Flatpak
- Date: Tue, 5 Feb 2019 20:41:39 +0000 (UTC)
commit 98c2f998ba1f6033d355e54d762c3cefdb1a92ce
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]