summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-24 13:14:48 +0000
committerrubidium <rubidium@openttd.org>2009-11-24 13:14:48 +0000
commit5e247b6e439f8e717991d1bc5df27ddb732b1865 (patch)
tree238c080e6239dd3e1762623b7813503af9354add /src/widget.cpp
parent912bce0b8cdeca9849dd257ca95566b009719d53 (diff)
downloadopenttd-5e247b6e439f8e717991d1bc5df27ddb732b1865.tar.xz
(svn r18267) -Codechange: make the music window big font aware
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 320a34e80..f4a64f412 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1693,7 +1693,8 @@ Dimension NWidgetLeaf::closebox_dimension = {0, 0};
*/
NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip) : NWidgetCore(tp, colour, 1, 1, data, tip)
{
- this->SetIndex(index);
+ assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT);
+ if (index >= 0) this->SetIndex(index);
this->SetMinimalSize(0, 0);
this->SetResize(0, 0);