diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-05 19:18:24 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-05 19:18:24 +0000 |
commit | f0caa7d190e51af9ba4a487dc371b56174d56f31 (patch) | |
tree | df7126c72187056d36478c43e878137303b3d156 /libdimension/png.c | |
parent | 32216655e1d8e523cf3e1239000442b2a30da193 (diff) | |
download | dimension-f0caa7d190e51af9ba4a487dc371b56174d56f31.tar.xz |
Make optimizer registration fail if a canvas has already been written
to.
Diffstat (limited to 'libdimension/png.c')
-rw-r--r-- | libdimension/png.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdimension/png.c b/libdimension/png.c index c8ffc62..76308ca 100644 --- a/libdimension/png.c +++ b/libdimension/png.c @@ -54,7 +54,10 @@ dmnsn_png_optimize_canvas(dmnsn_canvas *canvas) return 1; } - dmnsn_optimize_canvas(canvas, optimizer); + if (dmnsn_optimize_canvas(canvas, optimizer) != 0) { + free(optimizer.ptr); + return 1; + } return 0; } |