From b3893d6c75374feae6eb41ded0c1364adbcc0481 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sat, 21 Feb 2009 03:54:36 -0500 Subject: [PATCH] Don't delete profile when toggling on_profile --- sysprof.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sysprof.c b/sysprof.c index b626385..64fa8be 100644 --- a/sysprof.c +++ b/sysprof.c @@ -636,7 +636,7 @@ ensure_profile (Application *app) { if (app->profile) return; - + app->profile = collector_create_profile (app->collector); collector_stop (app->collector); @@ -682,16 +682,10 @@ static void on_profile_toggled (GtkWidget *widget, gpointer data) { Application *app = data; - + if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button))) { set_busy (app->main_window, TRUE); - if (app->profile && !app->profile_from_file) - { - profile_free (app->profile); - app->profile = NULL; - } - ensure_profile (app); set_busy (app->main_window, FALSE); } -- 2.7.4