summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-09-19 12:52:49 +0000
committeralberth <alberth@openttd.org>2009-09-19 12:52:49 +0000
commit86395277d35a53a3bb0abe74f454e59735d9a4b0 (patch)
tree467f2669a8dafd29bd9f248847d34854670c45e6 /src
parentceab116065b3bde0c8932f1006374f9e37529436 (diff)
downloadopenttd-86395277d35a53a3bb0abe74f454e59735d9a4b0.tar.xz
(svn r17574) -Fix (r17573): Insert NWID_SELECTION in nested_array when appropriate.
Diffstat (limited to 'src')
-rw-r--r--src/widget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 8f0e7b566..e2e9c4d5b 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1263,6 +1263,11 @@ void NWidgetStacked::SetIndex(int index)
void NWidgetStacked::SetupSmallestSize(Window *w, bool init_array)
{
+ if (this->index >= 0 && init_array) { // Fill w->nested_array[]
+ assert(w->nested_array_size > (uint)this->index);
+ w->nested_array[this->index] = this;
+ }
+
/* First sweep, recurse down and compute minimal size and filling. */
this->smallest_x = 0;
this->smallest_y = 0;