Fix possible crash in hasCommander()

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7816 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2009-06-24 02:50:27 +00:00 committed by Git SVN Gateway
parent 1f97005b83
commit d58af93eb5
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ void cmdDroidUpdateKills(DROID *psKiller, float experienceInc)
// returns true if a droid in question is assigned to a commander // returns true if a droid in question is assigned to a commander
bool hasCommander(const DROID* psDroid) bool hasCommander(const DROID* psDroid)
{ {
ASSERT(psDroid != NULL, "invalid droid pointer"); ASSERT_OR_RETURN(false, psDroid != NULL, "invalid droid pointer");
if (psDroid->droidType != DROID_COMMAND && if (psDroid->droidType != DROID_COMMAND &&
psDroid->psGroup != NULL && psDroid->psGroup != NULL &&