diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-05-25 01:46:01 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-05-25 01:46:01 -0700 |
commit | 5bf938797c73e8526b9ba228a3338d3972c2dfcd (patch) | |
tree | a62cc49945f61a29bca481687c3e66bfc730aeb1 /src/LuaBigInt.cc | |
parent | 383a221c5c70b664424cb0e48d04160c60aa3b24 (diff) |
Creating a Balau project file.
Diffstat (limited to 'src/LuaBigInt.cc')
-rw-r--r-- | src/LuaBigInt.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/LuaBigInt.cc b/src/LuaBigInt.cc index d70cc55..b608afd 100644 --- a/src/LuaBigInt.cc +++ b/src/LuaBigInt.cc @@ -134,7 +134,7 @@ int sLua_BigInt::BigInt_proceed_static(Lua & L, int n, int caller) { switch (caller) { case BIGINT_CONSTRUCTOR: { - BigInt * a; + BigInt * a = NULL; if (L.type() == LUA_TSTRING) { a = new BigInt(); s = L.tostring(1); @@ -155,9 +155,11 @@ int sLua_BigInt::BigInt_proceed_static(Lua & L, int n, int caller) { } else { L.error("Invalid arguments to BigInt:new"); } - LuaBigIntFactory o(a); - o.pushDestruct(L); - r = 1; + if (a) { + LuaBigIntFactory o(a); + o.pushDestruct(L); + r = 1; + } break; } } |