summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-26 13:27:34 +0000
committerrubidium <rubidium@openttd.org>2013-11-26 13:27:34 +0000
commit02059ab4a78889cd60b83fa032f7a4b1a4921a96 (patch)
tree19047ba249e8634f59f4ea7480de4999ef359596 /src/widget.cpp
parent79ccf48636c5290b453dccc9bfec660b9ba073ef (diff)
downloadopenttd-02059ab4a78889cd60b83fa032f7a4b1a4921a96.tar.xz
(svn r26123) -Fix: make sure the maximum row length when making company buttons is at least 1
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 6e73fd449..4b215c346 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -2835,6 +2835,7 @@ NWidgetContainer *MakeWindowNWidgetTree(const NWidgetPart *parts, int count, int
*/
NWidgetBase *MakeCompanyButtonRows(int *biggest_index, int widget_first, int widget_last, int max_length, StringID button_tooltip)
{
+ assert(max_length >= 1);
NWidgetVertical *vert = NULL; // Storage for all rows.
NWidgetHorizontal *hor = NULL; // Storage for buttons in one row.
int hor_length = 0;