summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_core.cpp')
-rw-r--r--plugins/MirLua/src/m_core.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp
index 46d6c50c8b..c58ce9cf1f 100644
--- a/plugins/MirLua/src/m_core.cpp
+++ b/plugins/MirLua/src/m_core.cpp
@@ -5,14 +5,11 @@ static int core_CreateHookableEvent(lua_State *L)
const char *name = luaL_checkstring(L, 1);
HANDLE res = CreateHookableEvent(name);
- if (res == NULL)
- {
+ if (res != nullptr)
+ lua_pushlightuserdata(L, res);
+ else
lua_pushnil(L);
- return 1;
- }
- lua_pushlightuserdata(L, res);
-
return 1;
}