diff --git a/src/order.cpp b/src/order.cpp index 1bc1fd8dd02..0c7afcf43e5 100644 --- a/src/order.cpp +++ b/src/order.cpp @@ -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");