mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 04:22:32 +02:00
Fixed potential OOS
This commit is contained in:
@@ -427,8 +427,10 @@ namespace
|
||||
const Unit * targetUnit,
|
||||
bool tryQueue,
|
||||
int unitCommandGroupId, bool isMove) const {
|
||||
std::pair < CommandResult, string > result(crFailUndefined, "");
|
||||
|
||||
if (this->pauseNetworkCommands == true) {
|
||||
return std::pair < CommandResult, string >(crFailUndefined, "");
|
||||
return result;
|
||||
}
|
||||
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
|
||||
@@ -438,8 +440,6 @@ namespace
|
||||
extractFileFromDirectoryPath(__FILE__).
|
||||
c_str(), __FUNCTION__, __LINE__);
|
||||
|
||||
std::pair < CommandResult, string > result(crFailUndefined, "");
|
||||
|
||||
if (selection->isEmpty() == false) {
|
||||
Vec2i
|
||||
refPos,
|
||||
@@ -684,7 +684,7 @@ namespace
|
||||
}
|
||||
/*throw
|
||||
megaglest_runtime_error(szBuf);*/
|
||||
return result;
|
||||
return std::pair<CommandResult, string>(crFailUndefined, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user