gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年11月16日 19:51:16 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年11月16日 19:51:16 +0100
commitb98c33f92a95b37070ecedc5c370da94bda555c3 (patch)
tree369d5be83376717d18da9273a12e00a1eea1ab09 /agg-plot/window.cpp
parent3eb3e2914379a4f902faf69e92a1c92f67f9da66 (diff)
downloadgsl-shell-b98c33f92a95b37070ecedc5c370da94bda555c3.tar.gz
Fix bug related to defer_show argument in graph.window
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 5
1 files changed, 3 insertions, 2 deletions
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)
{
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月12日 23:16:37 +0000

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