[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
This commit is contained in:
James Bursa 2003-09-17 12:56:43 +00:00
parent f4e447871b
commit d0d3e96cbb

View File

@ -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 */
}