diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c index ad40b3626fdb9362ee231b847de7cf53990c6f3e..ec1ee26b485a1491f4ce47737072fb325adbad30 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(); }