summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/gtk/setup.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2012-08-17 18:56:23 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-20 14:29:12 +0200
commit2708bf3a30b7bfa02d60a3f03603b6b92d093f1a (patch)
tree1c61a4d640d3a877c291e02dda5156f6db2482e4 /tools/perf/ui/gtk/setup.c
parentperf tools: Rename global variable 'events' in util/header.c (diff)
downloadlinux-2708bf3a30b7bfa02d60a3f03603b6b92d093f1a.tar.xz
linux-2708bf3a30b7bfa02d60a3f03603b6b92d093f1a.zip
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 <penberg@kernel.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1345222583-3964-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/setup.c')
-rw-r--r--tools/perf/ui/gtk/setup.c2
1 files changed, 2 insertions, 0 deletions
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();
}