[totem] main: Don't crash if the plugins weren't loaded
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Don't crash if the plugins weren't loaded
- Date: Sat, 12 Feb 2011 02:14:39 +0000 (UTC)
commit 9342606a43239cda9420bc1c0090988006f50404
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 9 01:55:08 2011 +0000
main: Don't crash if the plugins weren't loaded
If we exit before the plugins engine was setup, please don't crash.
src/totem-object.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 2a8108c..922a1cb 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -955,7 +955,8 @@ totem_object_action_exit (TotemObject *totem)
char *page_id;
/* Shut down the plugins first, allowing them to display modal dialogues (etc.) without threat of being killed from another thread */
- totem_plugins_engine_shut_down (totem->engine);
+ if (totem != NULL && totem->engine != NULL)
+ totem_plugins_engine_shut_down (totem->engine);
/* Exit forcefully if we can't do the shutdown in 10 seconds */
g_thread_create ((GThreadFunc) totem_action_wait_force_exit,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]