summaryrefslogtreecommitdiff
path: root/content/content.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-09-17 12:56:43 +0000
committerJames Bursa <james@netsurf-browser.org>2003-09-17 12:56:43 +0000
commitd0d3e96cbb77cddee69ad7f8740d562d27051fc5 (patch)
treebe22d1bc6fe531c7c6eed041c4f6140d278e8e44 /content/content.c
parentf4e447871bb0a84c71943b73344b987529567cea (diff)
downloadnetsurf-d0d3e96cbb77cddee69ad7f8740d562d27051fc5.tar.gz
netsurf-d0d3e96cbb77cddee69ad7f8740d562d27051fc5.tar.bz2
[project @ 2003-09-17 12:56:43 by bursa]
Fix memory corruption when content destroyed from CONTENT_MSG_LOADING. svn path=/import/netsurf/; revision=295
Diffstat (limited to 'content/content.c')
-rw-r--r--content/content.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/content.c b/content/content.c
index 4e63c9ceb..7489d1838 100644
--- a/content/content.c
+++ b/content/content.c
@@ -180,8 +180,10 @@ void content_set_type(struct content *c, content_type type, char* mime_type)
c->type = type;
c->mime_type = xstrdup(mime_type);
c->status = CONTENT_STATUS_LOADING;
- content_broadcast(c, CONTENT_MSG_LOADING, 0);
handler_map[type].create(c);
+ content_broadcast(c, CONTENT_MSG_LOADING, 0);
+ /* c may be destroyed at this point as a result of
+ * CONTENT_MSG_LOADING, so must not be accessed */
}