From 2708bf3a30b7bfa02d60a3f03603b6b92d093f1a Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Sat, 18 Aug 2012 01:56:23 +0900 Subject: [PATCH] perf ui gtk: Ensure not to call gtk_main_quit() twice 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 Signed-off-by: Namhyung Kim Acked-by: Pekka Enberg Cc: Ingo Molnar Cc: Pekka Enberg Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1345222583-3964-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 ad40b36..ec1ee26 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(); } -- 2.7.4