summaryrefslogtreecommitdiff
path: root/src/lua5
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua5')
-rw-r--r--src/lua5/cdlua5_canvas.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index 0ea9b1b..d6e9849 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -376,6 +376,12 @@ static int cdlua5_transform(lua_State *L)
double matrix[6];
int i;
+ if (lua_isnil(L, 2))
+ {
+ cdCanvasTransform(cdlua_checkcanvas(L, 1), NULL);
+ return 0;
+ }
+
if (!lua_istable(L, 2))
luaL_argerror(L, 2, "invalid matrix, must be a table");