summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-28 01:27:44 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-28 01:27:44 +0000
commit8468bbbb2d9b865dcbe8728043936969d4859877 (patch)
tree5ed698422687eb7d5cf14212769fb6479d9ab2a9 /image
parent8f871d43a7ef9454b756ddfdb85b33b00bd2eb90 (diff)
downloadnetsurf-8468bbbb2d9b865dcbe8728043936969d4859877.tar.gz
netsurf-8468bbbb2d9b865dcbe8728043936969d4859877.tar.bz2
Aliasing fixes
svn path=/trunk/netsurf/; revision=6961
Diffstat (limited to 'image')
-rw-r--r--image/mng.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/image/mng.c b/image/mng.c
index b029301e8..08de81724 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -365,8 +365,14 @@ bool nsmng_convert(struct content *c, int width, int height)
/* free associated memory except for mngs where it may be subsequently needed for
* animation decoding. */
- if (c->type != CONTENT_MNG)
- mng_cleanup((mng_handle *) &c->data.mng.handle);
+ if (c->type != CONTENT_MNG) {
+ mng_handle handle = c->data.mng.handle;
+
+ mng_cleanup(&handle);
+
+ c->data.mng.handle = NULL;
+ }
+
return true;
}
@@ -505,10 +511,17 @@ void nsmng_destroy(struct content *c)
/* Cleanup the MNG structure and release the canvas memory
*/
schedule_remove(nsmng_animate, c);
- if (c->type == CONTENT_MNG)
- mng_cleanup((mng_handle *) &c->data.mng.handle);
+ if (c->type == CONTENT_MNG) {
+ mng_handle handle = c->data.mng.handle;
+
+ mng_cleanup(&handle);
+
+ c->data.mng.handle = NULL;
+ }
+
if (c->bitmap)
bitmap_destroy(c->bitmap);
+
free(c->title);
}