From d58af93eb5ab3f72eab60ea01ca269b7288da303 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 24 Jun 2009 02:50:27 +0000 Subject: [PATCH] Fix possible crash in hasCommander() git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7816 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/cmddroid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmddroid.c b/src/cmddroid.c index a3d355ae4..70ebd1251 100644 --- a/src/cmddroid.c +++ b/src/cmddroid.c @@ -190,7 +190,7 @@ void cmdDroidUpdateKills(DROID *psKiller, float experienceInc) // returns true if a droid in question is assigned to a commander 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 && psDroid->psGroup != NULL &&