From e36af6f9692993def310cc48ab5c2f65fb0f0267 Mon Sep 17 00:00:00 2001 From: red-001 Date: Wed, 27 Jun 2018 16:45:40 +0100 Subject: Fix mod channels crash (#7481) --- src/script/lua_api/l_modchannels.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/script/lua_api/l_modchannels.h') diff --git a/src/script/lua_api/l_modchannels.h b/src/script/lua_api/l_modchannels.h index dbbf11a05..9b948002b 100644 --- a/src/script/lua_api/l_modchannels.h +++ b/src/script/lua_api/l_modchannels.h @@ -37,11 +37,11 @@ public: class ModChannelRef : public ModApiBase { public: - ModChannelRef(ModChannel *modchannel); + ModChannelRef(const std::string &modchannel); ~ModChannelRef() = default; static void Register(lua_State *L); - static void create(lua_State *L, ModChannel *channel); + static void create(lua_State *L, const std::string &channel); // leave() static int l_leave(lua_State *L); @@ -57,9 +57,9 @@ private: static int gc_object(lua_State *L); static ModChannelRef *checkobject(lua_State *L, int narg); - static ModChannel *getobject(ModChannelRef *ref); + static ModChannel *getobject(lua_State *L, ModChannelRef *ref); - ModChannel *m_modchannel = nullptr; + std::string m_modchannel_name; static const char className[]; static const luaL_Reg methods[]; -- cgit v1.2.3