[project @ 2006-01-25 08:25:37 by jmb]

Fix stupid aborts due to not removing scheduled callbacks

svn path=/import/netsurf/; revision=2040
This commit is contained in:
John Mark Bell 2006-01-25 08:25:38 +00:00
parent 0f77b057a1
commit 9f7e57c99d
2 changed files with 10 additions and 1 deletions

View File

@ -570,6 +570,8 @@ void browser_window_stop(struct browser_window *bw)
browser_window_callback, (intptr_t) bw, 0); browser_window_callback, (intptr_t) bw, 0);
} }
schedule_remove(browser_window_refresh, bw);
browser_window_stop_throbber(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); browser_window_callback, (intptr_t) bw, 0);
} }
schedule_remove(browser_window_refresh, bw);
selection_destroy(bw->sel); selection_destroy(bw->sel);
history_destroy(bw->history); history_destroy(bw->history);
gui_window_destroy(bw->window); gui_window_destroy(bw->window);

View File

@ -1374,9 +1374,13 @@ void html_destroy(struct content *c)
/* Free objects */ /* Free objects */
for (i = 0; i != c->data.html.object_count; i++) { for (i = 0; i != c->data.html.object_count; i++) {
LOG(("object %i %p", i, c->data.html.object[i].content)); 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, content_remove_user(c->data.html.object[i].content,
html_object_callback, (intptr_t) c, i); 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; unsigned int i;
c->data.html.bw = 0; c->data.html.bw = 0;
schedule_remove(html_object_refresh, c);
for (i = 0; i != c->data.html.object_count; i++) { for (i = 0; i != c->data.html.object_count; i++) {
if (c->data.html.object[i].content == 0) if (c->data.html.object[i].content == 0)
continue; continue;