summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 224031a2e..873bfa616 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -199,6 +199,9 @@ void Window::RaiseButtons(bool autoraise)
*/
void Window::SetWidgetDirty(byte widget_index) const
{
+ /* Sometimes this function is called before the window is even fully initialized */
+ if (this->nested_array == NULL) return;
+
this->nested_array[widget_index]->SetDirty(this);
}