1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-23 08:08:47 -05:00

Handle missing tablecolumns[], fixes bug #1187

This commit is contained in:
Kahrl 2014-06-24 01:26:43 +02:00
parent a578f34db5
commit d1ee708db2

View File

@ -183,6 +183,16 @@ void GUITable::setTable(const TableOptions &options,
// j is always a column index, 0-based // j is always a column index, 0-based
// k is another index, for example an option index // 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 // Handle table options
video::SColor default_color(255, 255, 255, 255); video::SColor default_color(255, 255, 255, 255);
s32 opendepth = 0; s32 opendepth = 0;