diff options
author | Kahrl <kahrl@gmx.net> | 2014-06-24 01:26:43 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2014-06-24 02:00:29 +0200 |
commit | d1ee708db2bd41cf46f5cafc54053e54f47fbac9 (patch) | |
tree | 6d06584101105ceb16c5190ee45093853f2675b7 /src | |
parent | a578f34db551bdd3c822ec03b1e1a7d542026709 (diff) | |
download | minetest-d1ee708db2bd41cf46f5cafc54053e54f47fbac9.tar.gz minetest-d1ee708db2bd41cf46f5cafc54053e54f47fbac9.tar.bz2 minetest-d1ee708db2bd41cf46f5cafc54053e54f47fbac9.zip |
Handle missing tablecolumns[], fixes bug #1187
Diffstat (limited to 'src')
-rw-r--r-- | src/guiTable.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/guiTable.cpp b/src/guiTable.cpp index c8930410a..e2da4eada 100644 --- a/src/guiTable.cpp +++ b/src/guiTable.cpp @@ -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; |