From fc1213794ea2667e79b8099316dbd147ff9cac41 Mon Sep 17 00:00:00 2001 From: Karl Kleinpaste Date: Thu, 13 Aug 2026 14:35:52 -0400 Subject: [PATCH] new fix for parallel tab crash: NULL the pointer on destruction. tried g_free(html_parallel_dialog) but that causes immediate crash in free(). so we just NULL it out because apparently it's already freed by then. this seems to solve the problem since the pointer is NULL so the test in main_update_parallel_page_detached() for "!widgets.html_parallel_dialog" will correctly stop the failure. --- src/gtk/main_window.c | 3 +++ src/gtk/parallel_tab.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/gtk/main_window.c b/src/gtk/main_window.c index 01a3a8a93..d2749f58d 100644 --- a/src/gtk/main_window.c +++ b/src/gtk/main_window.c @@ -1020,6 +1020,9 @@ void create_mainwindow(void) widgets.studypad_dialog = NULL; widgets.entry_devotional = NULL; + widgets.html_parallel = NULL; + widgets.html_parallel_dialog = NULL; + /* A rough scektch of the main window (widgets.app) and it's children * widgets.app * | diff --git a/src/gtk/parallel_tab.c b/src/gtk/parallel_tab.c index 729dde87c..963a70295 100644 --- a/src/gtk/parallel_tab.c +++ b/src/gtk/parallel_tab.c @@ -282,6 +282,7 @@ void gui_destroy_parallel_tab(void) sync_on = FALSE; gtk_widget_destroy(parallel_vbox); gtk_widget_show(widgets.hpaned); + widgets.html_parallel_dialog = NULL; } /****** end of file ******/