Codechange: add non-nullptr asserts in cases where it should never be nullptr
Though where similar calls are checked for nullptr as in those instances of the use of that function it can actually return nullptr. In other words, write down the assumption that the function never returns nullptr in an assert.
This commit is contained in:
@@ -925,6 +925,7 @@ DEF_CONSOLE_CMD(ConResetCompany)
|
||||
return false;
|
||||
}
|
||||
const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER);
|
||||
assert(ci != nullptr);
|
||||
if (ci->client_playas == index) {
|
||||
IConsolePrint(CC_ERROR, "Cannot remove company: the server is connected to that company.");
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user