From c70087db0c17cf205a5922d30771a1e3f91b25af Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 6 Jun 2011 16:18:09 -0400 Subject: [PATCH] meta_quit: ignore repeated calls after it's already quitting meta_run() calls meta_finalize() after the main loop exits, which ends up calling meta_display_close(), which calls meta_quit(META_EXIT_SUCCESS), meaning that any exit status passed to the original meta_quit() call is lost. Fix this by ignoring meta_quit() calls after the main loop is no longer running. https://bugzilla.gnome.org/show_bug.cgi?id=652010 --- src/core/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index c7fe29054..b5c8e0940 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -571,10 +571,11 @@ meta_run (void) void meta_quit (MetaExitCode code) { - meta_exit_code = code; - if (g_main_loop_is_running (meta_main_loop)) - g_main_loop_quit (meta_main_loop); + { + meta_exit_code = code; + g_main_loop_quit (meta_main_loop); + } } /**