From 43ed87ab46a7fdf99ef02747b6d7f2bd15975271 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 7 Mar 2019 15:17:59 +0100 Subject: Added sanity cehck in cObject::moveObject() to check if hit object exists --- src/cObjectHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cObjectHandler.cpp b/src/cObjectHandler.cpp index da0dcc9..02dd115 100644 --- a/src/cObjectHandler.cpp +++ b/src/cObjectHandler.cpp @@ -50,7 +50,7 @@ int cObjectHandler::moveObject(unsigned int _object, sPos _pos, int _mode) { for(unsigned int i = 0; i < coll.idc; i++) { - if(coll.idv[i] != _object) + if(coll.idv[i] != _object && objects[coll.idv[i]]) abort += objects[_object]->onCollisionActive(_pos, objects[coll.idv[i]]->onCollisionPassive(_pos)); } } -- cgit v1.2.3