diff options
-rw-r--r-- | content/content.c | 4 |
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 */ } |