From 5bf938797c73e8526b9ba228a3338d3972c2dfcd Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 25 May 2014 01:46:01 -0700 Subject: Creating a Balau project file. --- src/BLua.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/BLua.cc') diff --git a/src/BLua.cc b/src/BLua.cc index d3e50b6..8d6b3ee 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -1066,7 +1066,7 @@ void Balau::LuaObjectFactory::pushMe(Lua & L, LuaObjectBase * o, const char * ob } Balau::LuaObjectBase * Balau::LuaObjectFactory::getMeInternal(Lua & L, int i) { - LuaObjectBase * o; + LuaObjectBase * o = NULL; if (L.istable(i)) { L.push("__obj"); @@ -1074,9 +1074,7 @@ Balau::LuaObjectBase * Balau::LuaObjectFactory::getMeInternal(Lua & L, int i) { if (!(o = (LuaObjectBase *) L.touserdata())) L.error("Table is not an object."); L.pop(); - } else if (L.isnil(i)) { - o = NULL; - } else { + } else if (!L.isnil(i)) { L.error("Not an object (not even a table)."); } -- cgit v1.2.3