mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-02 08:15:59 +00:00
Crash safely with an error when sphrase is missing on client
This commit is contained in:
parent
12e64f806f
commit
ba0243791d
1 changed files with 7 additions and 5 deletions
|
@ -4513,7 +4513,9 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const
|
||||||
if (!phrase.Bricks.empty())
|
if (!phrase.Bricks.empty())
|
||||||
{
|
{
|
||||||
CSBrickSheet *rootBrick = pBM->getBrick(phrase.Bricks[0]);
|
CSBrickSheet *rootBrick = pBM->getBrick(phrase.Bricks[0]);
|
||||||
if(actMalus && !rootBrick->isSpecialPower())
|
if (!rootBrick)
|
||||||
|
nlerror("Invalid root sbrick in sphrase_com '%s'", phrase.Name.toUtf8().c_str());
|
||||||
|
else if (actMalus && !rootBrick->isSpecialPower())
|
||||||
totalActionMalus = actMalus->getValue32();
|
totalActionMalus = actMalus->getValue32();
|
||||||
}
|
}
|
||||||
return totalActionMalus;
|
return totalActionMalus;
|
||||||
|
|
Loading…
Reference in a new issue