[smuxi/stable] Frontend-GNOME: fix Gtk-CRITICAL main_loops != NULL assert on quit
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/stable] Frontend-GNOME: fix Gtk-CRITICAL main_loops != NULL assert on quit
- Date: Mon, 25 Jan 2016 18:36:01 +0000 (UTC)
commit 8b4a1a7359dc3e778a38ab454ac17edfae538701
Author: Mirco Bauer <meebey meebey net>
Date: Mon Jan 25 18:10:58 2016 +0100
Frontend-GNOME: fix Gtk-CRITICAL main_loops != NULL assert on quit
When quitting Smuxi from the engine selection dialog, it shows a Gtk-CRITICAL
assertion message like this:
(smuxi-frontend-gnome:16423): Gtk-CRITICAL **: IA__gtk_main_quit: assertion 'main_loops != NULL'
failed
This happens because Smuxi tries to quit the GTK+ event loop without starting
it. So check if we are in the GTK+ loop before calling Gtk.Application.Quit().
src/Frontend-GNOME/Frontend.cs | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/Frontend-GNOME/Frontend.cs b/src/Frontend-GNOME/Frontend.cs
index 805d43d..e0f9d53 100644
--- a/src/Frontend-GNOME/Frontend.cs
+++ b/src/Frontend-GNOME/Frontend.cs
@@ -514,8 +514,10 @@ namespace Smuxi.Frontend.Gnome
log4net.Core.LoggerManager.Shutdown();
#endif
- Gtk.Application.Quit();
-
+ if (IsGtkInitialized && InGtkApplicationRun) {
+ Gtk.Application.Quit();
+ }
+
Environment.Exit(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]