diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-03-07 15:17:59 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-03-07 15:17:59 +0100 |
commit | 43ed87ab46a7fdf99ef02747b6d7f2bd15975271 (patch) | |
tree | 4628c6fc8c6d7d975427b682d123170f9936aa8e /src | |
parent | 7fdf648555febd21456d6e3baf4b06f131d9ec04 (diff) | |
download | termgl-43ed87ab46a7fdf99ef02747b6d7f2bd15975271.tar.gz |
Added sanity cehck in cObject::moveObject() to check if hit object exists
Diffstat (limited to 'src')
-rw-r--r-- | src/cObjectHandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } } |