--- a/src/ai/api/ai_sign.hpp.sq Thu Jul 19 17:13:38 2007 +0000
+++ b/src/ai/api/ai_sign.hpp.sq Thu Jul 19 19:42:54 2007 +0000
@@ -6,7 +6,7 @@
template <> AISign &GetParam(ForceType<AISign &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AISign *)instance; }
template <> const AISign *GetParam(ForceType<const AISign *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISign *)instance; }
template <> const AISign &GetParam(ForceType<const AISign &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AISign *)instance; }
- template <> int Return<AISign *>(HSQUIRRELVM vm, AISign *res) { res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISign", res, NULL, DefSQDestructorCallback<AISign>); return 1; }
+ template <> int Return<AISign *>(HSQUIRRELVM vm, AISign *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISign", res, NULL, DefSQDestructorCallback<AISign>); return 1; }
}; // namespace SQConvert
void SQAISignRegister(Squirrel *engine) {