Don't leak frame scrollbars.

This commit is contained in:
Michael Drake 2015-10-31 14:05:03 +00:00
parent f2e56834be
commit 519775a65c
1 changed files with 9 additions and 0 deletions

View File

@ -1749,6 +1749,15 @@ static void browser_window_destroy_internal(struct browser_window *bw)
browser_window_destroy_children(bw);
}
/* Destroy scrollbars */
if (bw->scroll_x != NULL) {
scrollbar_destroy(bw->scroll_x);
}
if (bw->scroll_y != NULL) {
scrollbar_destroy(bw->scroll_y);
}
/* clear any pending callbacks */
guit->browser->schedule(-1, browser_window_refresh, bw);
/* The ugly cast here is so the reformat function can be