Skip to content

Commit

Permalink
Fix crash in Lupos shop
Browse files Browse the repository at this point in the history
  • Loading branch information
MunWolf committed Nov 22, 2023
1 parent ecdf422 commit 766aba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/Randomizer/game/shops/lupo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ namespace {

auto show_cost = cost != 0 && slot->visibility == SlotVisibility::Visible;
GameObject::SetActive(this_ptr->fields.CostGO, show_cost);
GameObject::SetActive(this_ptr->fields.SpiritLightGO, show_cost);
if (this_ptr->fields.SpiritLightGO != nullptr) {
GameObject::SetActive(this_ptr->fields.SpiritLightGO, show_cost);
}

if (show_cost) {
auto text_box = il2cpp::unity::get_component<app::TextBox>(this_ptr->fields.CostGO, types::TextBox::get_class());
Expand Down

0 comments on commit 766aba0

Please sign in to comment.