summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 073252b4a..d80886556 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -994,14 +994,9 @@ void browser_window_destroy_internal(struct browser_window *bw)
/* Destruction order is important: we must ensure that the frontend
* destroys any window(s) associated with this browser window before
* we attempt any destructive cleanup.
- *
- * Additionally, we must destroy any selection and history before
- * releasing the handle to any content objects this window is using.
*/
gui_window_destroy(bw->window);
- selection_destroy(bw->sel);
- history_destroy(bw->history);
if (bw->loading_content != NULL) {
hlcache_handle_release(bw->loading_content);
@@ -1018,6 +1013,10 @@ void browser_window_destroy_internal(struct browser_window *bw)
bw->current_content = NULL;
}
+ /* These simply free memory, so are safe here */
+ selection_destroy(bw->sel);
+ history_destroy(bw->history);
+
free(bw->name);
free(bw->frag_id);
free(bw->status_text);