Skip to content

Commit

Permalink
Check for nullptr on object in orderDroidObj()
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Feb 27, 2024
1 parent 72a1c32 commit 858487a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,7 @@ void orderDroidObj(DROID *psDroid, DROID_ORDER order, BASE_OBJECT *psObj, QUEUE_
{
ASSERT(psDroid != nullptr, "Invalid unit pointer");
ASSERT(validOrderForObj(order), "Invalid order for object");
ASSERT_OR_RETURN(, psObj != nullptr, "Invalid object pointer");
ASSERT_OR_RETURN(, !isBlueprint(psObj), "Target %s is a blueprint", objInfo(psObj));
ASSERT_OR_RETURN(, !psObj->died, "Target dead");

Expand Down

0 comments on commit 858487a

Please sign in to comment.