summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/luaengine.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/luaengine.ipp')
-rw-r--r--src/frontend/mame/luaengine.ipp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/mame/luaengine.ipp b/src/frontend/mame/luaengine.ipp
index 811940cdd1f..8af5a937eb4 100644
--- a/src/frontend/mame/luaengine.ipp
+++ b/src/frontend/mame/luaengine.ipp
@@ -92,9 +92,9 @@ protected:
auto p(sol::stack::unqualified_check_get<T *>(L, 1));
if (!p)
luaL_error(L, "sol: 'self' is not of type '%s' (pass 'self' as first argument with ':' or call on proper type)", sol::detail::demangle<T>().c_str());
- if (!p.value())
+ if (*p)
luaL_error(L, "sol: 'self' argument is nil (pass 'self' as first argument with ':' or call on a '%s' type", sol::detail::demangle<T>().c_str());
- return *p.value();
+ return **p;
}
struct indexed_iterator