All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf ui/gtk: Ensure not to call gtk_main_quit() twice
@ 2012-08-17 16:56 Namhyung Kim
  2012-08-18  7:52 ` Pekka Enberg
  2012-08-21 16:29 ` [tip:perf/core] perf ui gtk: " tip-bot for Namhyung Kim
  0 siblings, 2 replies; 7+ messages in thread
From: Namhyung Kim @ 2012-08-17 16:56 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Ingo Molnar, Peter Zijlstra, Pekka Enberg, LKML

Currently the gtk_main_quit() is called twice when perf exits so the
following warning is emitted:

  [penberg@tux perf]$ ./perf report --gtk
  ^Cperf: Interrupt

  (perf:4048): Gtk-CRITICAL **: IA__gtk_main_quit: assertion `main_loops != NULL' failed

Fix it by not to call it unnecessarily.

Reported-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/ui/gtk/setup.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
index ad40b3626fdb..ec1ee26b485a 100644
--- a/tools/perf/ui/gtk/setup.c
+++ b/tools/perf/ui/gtk/setup.c
@@ -13,6 +13,8 @@ int perf_gtk__init(void)
 
 void perf_gtk__exit(bool wait_for_ok __used)
 {
+	if (!perf_gtk__is_active_context(pgctx))
+		return;
 	perf_error__unregister(&perf_gtk_eops);
 	gtk_main_quit();
 }
-- 
1.7.9.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-21 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 16:56 [PATCH] perf ui/gtk: Ensure not to call gtk_main_quit() twice Namhyung Kim
2012-08-18  7:52 ` Pekka Enberg
2012-08-20  1:50   ` Namhyung Kim
2012-08-20  1:55     ` Namhyung Kim
2012-08-20  1:59       ` Namhyung Kim
2012-08-20  5:04         ` Pekka Enberg
2012-08-21 16:29 ` [tip:perf/core] perf ui gtk: " tip-bot for Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.