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/gl.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/gl.c')
-rw-r--r-- | libdimension/gl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdimension/gl.c b/libdimension/gl.c index a37d7f7..20c9af3 100644 --- a/libdimension/gl.c +++ b/libdimension/gl.c @@ -51,7 +51,10 @@ dmnsn_gl_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; } |