Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756189Ab2HTQ0v (ORCPT ); Mon, 20 Aug 2012 12:26:51 -0400 Received: from casper.infradead.org ([85.118.1.10]:56613 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534Ab2HTQ0j (ORCPT ); Mon, 20 Aug 2012 12:26:39 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Pekka Enberg , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 18/24] perf ui gtk: Ensure not to call gtk_main_quit() twice Date: Mon, 20 Aug 2012 13:26:19 -0300 Message-Id: <1345479985-18669-19-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.7.9.2.358.g22243 In-Reply-To: <1345479985-18669-1-git-send-email-acme@infradead.org> References: <1345479985-18669-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="UTF-8" X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1455 Lines: 45 From: Namhyung Kim 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 files changed, 2 insertions(+), 0 deletions(-) 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(); } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/