Skip to content

Commit d1ee708

Browse files
committedJun 24, 2014
Handle missing tablecolumns[], fixes bug #1187
1 parent a578f34 commit d1ee708

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/guiTable.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ void GUITable::setTable(const TableOptions &options,
183183
// j is always a column index, 0-based
184184
// k is another index, for example an option index
185185

186+
// Handle a stupid error case... (issue #1187)
187+
if (columns.empty()) {
188+
TableColumn text_column;
189+
text_column.type = "text";
190+
TableColumns new_columns;
191+
new_columns.push_back(text_column);
192+
setTable(options, new_columns, content);
193+
return;
194+
}
195+
186196
// Handle table options
187197
video::SColor default_color(255, 255, 255, 255);
188198
s32 opendepth = 0;

0 commit comments

Comments
 (0)
Please sign in to comment.