summaryrefslogtreecommitdiff
path: root/src/BLua.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-05-25 01:46:01 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-05-25 01:46:01 -0700
commit5bf938797c73e8526b9ba228a3338d3972c2dfcd (patch)
treea62cc49945f61a29bca481687c3e66bfc730aeb1 /src/BLua.cc
parent383a221c5c70b664424cb0e48d04160c60aa3b24 (diff)
Creating a Balau project file.
Diffstat (limited to 'src/BLua.cc')
-rw-r--r--src/BLua.cc6
1 files changed, 2 insertions, 4 deletions
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).");
}