Fix for Pokemon::ClearStatus crashing when a Pokemon does not have a status. Now will just do nothing.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
64c5a94800
commit
f816975b63
|
@ -39,6 +39,8 @@ void PkmnLib::Battling::Pokemon::SetStatus(const ArbUt::StringView& name) {
|
|||
}
|
||||
}
|
||||
void PkmnLib::Battling::Pokemon::ClearStatus() {
|
||||
if (_statusScript == nullptr)
|
||||
return;
|
||||
_statusScript->OnRemove();
|
||||
_statusScript = nullptr;
|
||||
if (_battle != nullptr) {
|
||||
|
|
Loading…
Reference in New Issue