summaryrefslogtreecommitdiffstats
path: root/application/widgets/ModListView.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-02-21 01:44:27 +0100
committerPetr Mrázek <peterix@gmail.com>2016-02-21 01:44:27 +0100
commit1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae (patch)
tree2c2fbc7a74ea5035fdfd8752272e011852eb1b85 /application/widgets/ModListView.cpp
parent495d320ce267cf6d7c7e4468dbc36d3536bcb401 (diff)
downloadMultiMC-1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae.tar
MultiMC-1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae.tar.gz
MultiMC-1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae.tar.lz
MultiMC-1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae.tar.xz
MultiMC-1a0bbdd9acaf1c5edaad6d3f0790c1b02674c0ae.zip
GH-1453 report version file problems in the version page
Diffstat (limited to 'application/widgets/ModListView.cpp')
-rw-r--r--application/widgets/ModListView.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/widgets/ModListView.cpp b/application/widgets/ModListView.cpp
index aa16ad05..51b4a475 100644
--- a/application/widgets/ModListView.cpp
+++ b/application/widgets/ModListView.cpp
@@ -46,6 +46,10 @@ void ModListView::setModel ( QAbstractItemModel* model )
head->setStretchLastSection(false);
// HACK: this is true for the checkbox column of mod lists
auto string = model->headerData(0,head->orientation()).toString();
+ if(head->count() < 1)
+ {
+ return;
+ }
if(!string.size())
{
head->setSectionResizeMode(0, QHeaderView::ResizeToContents);