changeset 13573:1def3f539a9b draft

(svn r18095) -Fix (r18093): a bit too much nested_array != NULL removal
author rubidium <rubidium@openttd.org>
date Sun, 15 Nov 2009 14:07:23 +0000
parents 9ae300119b3b
children 2bef074a26bf
files src/window.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -199,6 +199,9 @@
  */
 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);
 }