Skip to content

Commit a688712

Browse files
authored
Merge pull request #3416 from florianessl/fix/Allreise
Fix #3415 (Access violation in RM2K battle scene)
2 parents 3624893 + 79b72e5 commit a688712

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/scene_battle_rpg2k.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,12 @@ Scene_Battle_Rpg2k::BattleActionReturn Scene_Battle_Rpg2k::ProcessBattleActionAn
12241224
}
12251225

12261226
Scene_Battle_Rpg2k::BattleActionReturn Scene_Battle_Rpg2k::ProcessBattleActionExecute(Game_BattleAlgorithm::AlgorithmBase* action) {
1227+
if (!action->IsCurrentTargetValid()) {
1228+
// FIXME: Pick a new target instead of ending the action
1229+
SetBattleActionState(BattleActionState_Finished);
1230+
return BattleActionReturn::eContinue;
1231+
}
1232+
12271233
action->Execute();
12281234
if (action->GetType() == Game_BattleAlgorithm::Type::Normal
12291235
|| action->GetType() == Game_BattleAlgorithm::Type::Skill

0 commit comments

Comments
 (0)