[colobot] 266/390: Probably fixed null CObject* instances in object list, should fix #440, #441, #442 and #443
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:21:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch upstream/latest
in repository colobot.
commit 3c2b0a82064ce13d20520ac9f028070fed110921
Author: krzys-h <krzys_h at interia.pl>
Date: Sun Mar 8 16:11:22 2015 +0100
Probably fixed null CObject* instances in object list, should fix #440, #441, #442 and #443
---
src/object/objman.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/object/objman.cpp b/src/object/objman.cpp
index 0b279db..fee7b64 100644
--- a/src/object/objman.cpp
+++ b/src/object/objman.cpp
@@ -66,6 +66,7 @@ bool CObjectManager::DeleteObject(CObject* instance)
CObject* CObjectManager::GetObjectById(unsigned int id)
{
+ if(m_table.count(id) == 0) return nullptr;
return m_table[id];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list