diff --git a/include/keyboard/tiGUIManager.h b/include/keyboard/tiGUIManager.h index 8c0a83b3..0efb43ad 100644 --- a/include/keyboard/tiGUIManager.h +++ b/include/keyboard/tiGUIManager.h @@ -290,7 +290,7 @@ namespace textinput { public: PaneComponent(u32 id) : GUIComponent(id) { mpPane = NULL; } - virtual ~PaneComponent() {} // 0x08 + virtual ~PaneComponent(); // 0x08 virtual void draw(); // 0x1C diff --git a/src/keyboard/tiGUIManager.cpp b/src/keyboard/tiGUIManager.cpp index 237320f1..4d1c0f0b 100644 --- a/src/keyboard/tiGUIManager.cpp +++ b/src/keyboard/tiGUIManager.cpp @@ -315,8 +315,11 @@ namespace textinput { return NULL; } + PaneComponent::~PaneComponent() {} + void PaneManager::setAllBoundingBoxComponentTriggerTarget(bool bEnable) { - for (u32 i = 0; i < nw4r::ut::List_GetSize(&mPaneComponents); i++) { + const volatile u16& numObjects = mPaneComponents.numObjects; + for (u32 i = 0; i < numObjects; i++) { PaneToComponent* p = static_cast(nw4r::ut::List_GetNth(&mPaneComponents, (u16)i)); if (nw4r::ut::DynamicCast(p->getPane())) { p->mpComponent->setTriggerTarget(bEnable);