From f21dcf0efe8d791a8312179135093b54ba0cb906 Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Sun, 23 Nov 2014 21:32:28 -0500 Subject: [PATCH] complain more loudly about memory leaks --- src/scripting/lua_rng.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripting/lua_rng.cpp b/src/scripting/lua_rng.cpp index 46be19480121..3543688695b6 100644 --- a/src/scripting/lua_rng.cpp +++ b/src/scripting/lua_rng.cpp @@ -46,6 +46,8 @@ int impl_rng_destroy(lua_State* L) if (d == NULL) { ERR_LUA << "rng_destroy called on data of type: " << lua_typename( L, lua_type( L, 1 ) ) << std::endl; ERR_LUA << "This may indicate a memory leak, please report at bugs.wesnoth.org" << std::endl; + lua_pushstring(L, "Rng object garbage collection failure"); + lua_error(L); } else { d->~mt_rng(); }