[mutter] meta_quit: ignore repeated calls after it's already quitting
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] meta_quit: ignore repeated calls after it's already quitting
- Date: Mon, 6 Jun 2011 21:27:04 +0000 (UTC)
commit c70087db0c17cf205a5922d30771a1e3f91b25af
Author: Dan Winship <danw gnome org>
Date: Mon Jun 6 16:18:09 2011 -0400
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 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index c7fe290..b5c8e09 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);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]