From b98c33f92a95b37070ecedc5c370da94bda555c3 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: 2012年11月16日 19:51:16 +0100 Subject: Fix bug related to defer_show argument in graph.window --- agg-plot/window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'agg-plot/window.cpp') 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(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(L, GS_WINDOW, global_state); if (spec) { -- cgit v1.2.3

AltStyle によって変換されたページ (->オリジナル) /