From 703b5fea73f9bbdb4f41aebcd75f71d32d340a2d Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 18 Mar 2007 17:09:55 +0000 Subject: Ensure content owners check that they are still interested in a content when receiving notification that the content's in error. This prevents content pointers being corrupted when redirects occur. Fixes 1522002, 1551475. svn path=/trunk/netsurf/; revision=3211 --- riscos/plugin.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'riscos') diff --git a/riscos/plugin.c b/riscos/plugin.c index 302651e26..57f6f6515 100644 --- a/riscos/plugin.c +++ b/riscos/plugin.c @@ -1683,7 +1683,14 @@ void plugin_stream_callback(content_msg msg, struct content *c, break; case CONTENT_MSG_ERROR: - plugin_destroy_stream(p, plugin_STREAM_DESTROY_ERROR); + /* The plugin we were fetching may have been + * redirected, in that case, the object pointers + * will differ, so ensure that the object that's + * in error is still in use by us before destroying + * the stream */ + if (p->c == c) + plugin_destroy_stream(p, + plugin_STREAM_DESTROY_ERROR); break; case CONTENT_MSG_REDIRECT: -- cgit v1.2.3