summaryrefslogtreecommitdiffstats
path: root/libdimension/gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/gl.c')
-rw-r--r--libdimension/gl.c5
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;
}