Bug 798098 - Crash popup show when have 3 Windows in OSX

Don't free things twice, it always ends in tears.
This commit is contained in:
John Ralls 2021-01-25 13:01:14 -08:00
parent a754289daa
commit 9583c09f62

View File

@ -3324,8 +3324,9 @@ gnc_main_window_close_page (GncPluginPage *page)
gnc_main_window_remove_prefs (window); gnc_main_window_remove_prefs (window);
gtk_widget_destroy (GTK_WIDGET(window)); gtk_widget_destroy (GTK_WIDGET(window));
window = NULL;
} }
if (g_list_length (active_windows) > 1) if (window && g_list_length (active_windows) > 1)
{ {
gtk_widget_destroy (GTK_WIDGET(window)); gtk_widget_destroy (GTK_WIDGET(window));
} }