Fix for Pokemon::ClearStatus crashing when a Pokemon does not have a status. Now will just do nothing.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
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() {
|
void PkmnLib::Battling::Pokemon::ClearStatus() {
|
||||||
|
if (_statusScript == nullptr)
|
||||||
|
return;
|
||||||
_statusScript->OnRemove();
|
_statusScript->OnRemove();
|
||||||
_statusScript = nullptr;
|
_statusScript = nullptr;
|
||||||
if (_battle != nullptr) {
|
if (_battle != nullptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user