summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp2
-rw-r--r--src/window_gui.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 86b774364..00e42ff72 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -208,7 +208,7 @@ void Window::RaiseButtons()
}
if (this->nested_array != NULL) {
for (uint i = 0; i < this->nested_array_size; i++) {
- if (this->IsWidgetLowered(i)) {
+ if (this->nested_array[i] != NULL && this->IsWidgetLowered(i)) {
this->RaiseWidget(i);
this->InvalidateWidget(i);
}
diff --git a/src/window_gui.h b/src/window_gui.h
index 846a5a2db..45ef5b8f7 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -274,7 +274,7 @@ public:
}
if (this->nested_array != NULL) {
assert(widget_index < this->nested_array_size);
- this->nested_array[widget_index]->SetDisabled(disab_stat);
+ if (this->nested_array[widget_index] != NULL) this->nested_array[widget_index]->SetDisabled(disab_stat);
}
}