diff options
-rw-r--r-- | src/widget.cpp | 1 |
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; |