diff options
author | alberth <alberth@openttd.org> | 2009-12-22 19:40:23 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-12-22 19:40:23 +0000 |
commit | 7dbc77a1e74be00f520e84fa1605a9ba42a05879 (patch) | |
tree | b114f8aaaa25f3b844ec8321b963fd05731e8a8f /src/widget.cpp | |
parent | 3d2c126268a6fd23c0009348cd31853b182cf917 (diff) | |
download | openttd-7dbc77a1e74be00f520e84fa1605a9ba42a05879.tar.xz |
(svn r18605) -Codechange: Coding style fixes, prevent useless calls to UpdateWidgetSize().
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index e403b20c8..a79d01197 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -971,7 +971,7 @@ void NWidgetStacked::SetupSmallestSize(Window *w, bool init_array) Dimension fill = {0, 0}; Dimension resize = {0, 0}; /* Here we're primarily interested in the value of resize */ - w->UpdateWidgetSize(this->index, &size, padding, &fill, &resize); + if (this->index >= 0) w->UpdateWidgetSize(this->index, &size, padding, &fill, &resize); this->smallest_x = size.width; this->smallest_y = size.height; |