summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/browser.c4
-rw-r--r--render/html.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index d4cec3fcd..c585b14d0 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -570,6 +570,8 @@ void browser_window_stop(struct browser_window *bw)
browser_window_callback, (intptr_t) bw, 0);
}
+ schedule_remove(browser_window_refresh, bw);
+
browser_window_stop_throbber(bw);
}
@@ -658,6 +660,8 @@ void browser_window_destroy(struct browser_window *bw)
browser_window_callback, (intptr_t) bw, 0);
}
+ schedule_remove(browser_window_refresh, bw);
+
selection_destroy(bw->sel);
history_destroy(bw->history);
gui_window_destroy(bw->window);
diff --git a/render/html.c b/render/html.c
index c092df8c2..cfcb789ea 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1374,9 +1374,13 @@ void html_destroy(struct content *c)
/* Free objects */
for (i = 0; i != c->data.html.object_count; i++) {
LOG(("object %i %p", i, c->data.html.object[i].content));
- if (c->data.html.object[i].content)
+ if (c->data.html.object[i].content) {
content_remove_user(c->data.html.object[i].content,
html_object_callback, (intptr_t) c, i);
+ if (c->data.html.object[i].content->type == CONTENT_HTML)
+ schedule_remove(html_object_refresh,
+ c->data.html.object[i].content);
+ }
}
}
@@ -1415,6 +1419,7 @@ void html_close(struct content *c)
{
unsigned int i;
c->data.html.bw = 0;
+ schedule_remove(html_object_refresh, c);
for (i = 0; i != c->data.html.object_count; i++) {
if (c->data.html.object[i].content == 0)
continue;