Don't delete profile when toggling on_profile

This commit is contained in:
Søren Sandmann Pedersen
2009-02-21 03:54:36 -05:00
parent ed34b54ef2
commit b3893d6c75

View File

@ -636,7 +636,7 @@ ensure_profile (Application *app)
{ {
if (app->profile) if (app->profile)
return; return;
app->profile = collector_create_profile (app->collector); app->profile = collector_create_profile (app->collector);
collector_stop (app->collector); collector_stop (app->collector);
@ -682,16 +682,10 @@ static void
on_profile_toggled (GtkWidget *widget, gpointer data) on_profile_toggled (GtkWidget *widget, gpointer data)
{ {
Application *app = data; Application *app = data;
if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button))) if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button)))
{ {
set_busy (app->main_window, TRUE); set_busy (app->main_window, TRUE);
if (app->profile && !app->profile_from_file)
{
profile_free (app->profile);
app->profile = NULL;
}
ensure_profile (app); ensure_profile (app);
set_busy (app->main_window, FALSE); set_busy (app->main_window, FALSE);
} }