Skip to content
Snippets Groups Projects
Commit aedab248 authored by Joakim Hunskaar's avatar Joakim Hunskaar
Browse files

actually check the size of initialoptions

parent e04fb1f4
No related branches found
No related tags found
1 merge request!7Dropdownlist is now more similar to the other widgets
......@@ -3,7 +3,7 @@
TDT4102::DropdownList::DropdownList(TDT4102::Point location, unsigned int width, unsigned int height, std::vector<std::string> &initialOptions)
: TDT4102::Widget(location, width, height) {
if(options.size() == 0) {
if(initialOptions.size() == 0) {
throw std::runtime_error("The list of options must contain at least one option to choose from!");
}
options = initialOptions;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment