gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/plot-window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/plot-window.cpp')
-rw-r--r--agg-plot/plot-window.cpp 13
1 files changed, 11 insertions, 2 deletions
diff --git a/agg-plot/plot-window.cpp b/agg-plot/plot-window.cpp
index defda309..8d747046 100644
--- a/agg-plot/plot-window.cpp
+++ b/agg-plot/plot-window.cpp
@@ -158,6 +158,8 @@ plot_window::start()
gsl_shell_unref_plot (this->id);
GSL_SHELL_UNLOCK();
}
+
+ platform_support_unlock (this);
}
void *
@@ -223,7 +225,7 @@ int
plot_window_free (lua_State *L)
{
plot_window *win = plot_window::check (L, 1);
- printf("freying plot window\n");
+ printf("freeing plot window\n");
win->~plot_window();
return 0;
}
@@ -283,12 +285,19 @@ plot_window_index_protected (lua_State *L)
{
plot_window *win = plot_window::check(L, lua_upvalueindex(2));
+ platform_support_lock (win);
+
+ if (win->status != plot_window::running)
+ {
+ platform_support_unlock (win);
+ return luaL_error (L, "window is not active");
+ }
+
int narg = lua_gettop (L);
lua_pushvalue (L, lua_upvalueindex(1));
lua_insert (L, 1);
- platform_support_lock (win);
if (lua_pcall (L, narg, LUA_MULTRET, 0) != 0)
{
platform_support_unlock (win);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月28日 00:52:36 +0000

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