Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle missing tablecolumns[], fixes bug #1187
  • Loading branch information
kahrl committed Jun 24, 2014
1 parent a578f34 commit d1ee708
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/guiTable.cpp
Expand Up @@ -183,6 +183,16 @@ void GUITable::setTable(const TableOptions &options,
// j is always a column index, 0-based
// k is another index, for example an option index

// Handle a stupid error case... (issue #1187)
if (columns.empty()) {
TableColumn text_column;
text_column.type = "text";
TableColumns new_columns;
new_columns.push_back(text_column);
setTable(options, new_columns, content);
return;
}

// Handle table options
video::SColor default_color(255, 255, 255, 255);
s32 opendepth = 0;
Expand Down

0 comments on commit d1ee708

Please sign in to comment.