author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月16日 19:51:16 +0100 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月16日 19:51:16 +0100 |
commit | b98c33f92a95b37070ecedc5c370da94bda555c3 (patch) | |
tree | 369d5be83376717d18da9273a12e00a1eea1ab09 /agg-plot/window.cpp | |
parent | 3eb3e2914379a4f902faf69e92a1c92f67f9da66 (diff) | |
download | gsl-shell-b98c33f92a95b37070ecedc5c370da94bda555c3.tar.gz |
-rw-r--r-- | agg-plot/window.cpp | 5 |
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp index 3114f430..a2a5aa27 100644 --- a/agg-plot/window.cpp +++ b/agg-plot/window.cpp @@ -418,9 +418,10 @@ show_window(lua_State* L, window* win) int window_new (lua_State *L) { - window *win = push_new_object<window>(L, GS_WINDOW, global_state); const char *spec = lua_tostring (L, 1); - int defer_show = lua_toboolean(L, 2); + int defer_show = (lua_gettop(L) >= 2 ? lua_toboolean(L, 2) : 0); + + window *win = push_new_object<window>(L, GS_WINDOW, global_state); if (spec) { |