Fix possible crash in hasCommander()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7816 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
1f97005b83
commit
d58af93eb5
|
@ -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 &&
|
||||||
|
|
Loading…
Reference in New Issue