Skip to content

Commit

Permalink
perf ui gtk: Ensure not to call gtk_main_quit() twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Aug 20, 2012
1 parent db146f0 commit 2708bf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/ui/gtk/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit 2708bf3

Please sign in to comment.