From 8a884e1444a053e7ae9dab850558a99879998df5 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Sun, 5 Feb 2012 15:32:09 +0100 Subject: Fix a bug that can lead to premature garbage collection of mini plots --- agg-plot/lua-plot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'agg-plot/lua-plot.cpp') diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp index e567fe2f..5746a21d 100644 --- a/agg-plot/lua-plot.cpp +++ b/agg-plot/lua-plot.cpp @@ -671,8 +671,9 @@ plot_set_mini(lua_State *L) else return luaL_error (L, "invalid mini plot placement specification."); + int ref_index = (1 << 16) + (int)pos; lua_getfenv (L, 1); - objref_mref_add (L, -1, (int)pos, 3); + objref_mref_add (L, -1, ref_index, 2); AGG_LOCK(); p->add_mini_plot(mp, pos); -- cgit v1.2.3

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