summaryrefslogtreecommitdiff
path: root/src/osk_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osk_gui.cpp')
-rw-r--r--src/osk_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp
index 4d423ee81..e209ed1a6 100644
--- a/src/osk_gui.cpp
+++ b/src/osk_gui.cpp
@@ -79,8 +79,9 @@ struct OskWindow : public Window {
this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption;
}
if (parent->nested_array != NULL) {
- assert(parent->nested_array[button] != NULL);
- this->caption = (parent->nested_array[button]->widget_data != STR_NULL) ? parent->nested_array[button]->widget_data : parent->caption;
+ NWidgetCore *par_wid = parent->GetWidget<NWidgetCore>(button);
+ assert(par_wid != NULL);
+ this->caption = (par_wid->widget_data != STR_NULL) ? par_wid->widget_data : parent->caption;
}
this->qs = parent;