summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-15 14:07:23 +0000
committerrubidium <rubidium@openttd.org>2009-11-15 14:07:23 +0000
commitf6ec2fa5b9f7ba9376eac96dfdcfa9e921d94363 (patch)
tree69ece7d43a7c8f729d6c0d42a4c59c40e31de91f
parent54fb9444686533db89883e5720dd0f73223b4da7 (diff)
downloadopenttd-f6ec2fa5b9f7ba9376eac96dfdcfa9e921d94363.tar.xz
(svn r18095) -Fix (r18093): a bit too much nested_array != NULL removal
-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);
}