summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gui.c6
-rw-r--r--gtk/scaffolding.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gui.c b/gtk/gui.c
index 591eff425..c802e4ad6 100644
--- a/gtk/gui.c
+++ b/gtk/gui.c
@@ -496,7 +496,11 @@ int main(int argc, char** argv)
gui_init(argc, argv, respaths);
netsurf_main_loop();
-
+
+ /* Ensure all scaffoldings are destroyed before we go into exit */
+ while (scaf_list != NULL)
+ nsgtk_scaffolding_destroy(scaf_list);
+
netsurf_exit();
return 0;
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index a602cd54f..a07c57129 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -316,6 +316,8 @@ void nsgtk_scaffolding_destroy(nsgtk_scaffolding *g)
if (g->being_destroyed) return;
g->being_destroyed = 1;
nsgtk_window_close(g);
+ /* We're now unlinked, so let's finally destroy ourselves */
+ nsgtk_window_destroy_browser(g->top_level);
}
/**