summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-06-05 17:14:16 +0000
committerfrosch <frosch@openttd.org>2014-06-05 17:14:16 +0000
commit06b210ff4252ff981247bd5db4c4a2228cc9a61f (patch)
tree77da52ac171d89a67d9906c47d58528570f7fae8 /src/widgets
parentf0dcaaf19473fda58fee7c616b9940f42c16ff21 (diff)
downloadopenttd-06b210ff4252ff981247bd5db4c4a2228cc9a61f.tar.xz
(svn r26629) -Fix [FS#6012]: If the video driver fails to supply a list of resolutions, display an error message.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index d919eff7c..1f32b778e 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -116,6 +116,8 @@ struct DropdownWindow : Window {
DropdownWindow(Window *parent, const DropDownList *list, int selected, int button, bool instant_close, const Point &position, const Dimension &size, Colours wi_colour, bool scroll)
: Window(&_dropdown_desc)
{
+ assert(list->Length() > 0);
+
this->position = position;
this->CreateNestedTree();