aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourceFolderModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/ResourceFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/minecraft/mod/ResourceFolderModel.cpp b/launcher/minecraft/mod/ResourceFolderModel.cpp
index b2356309..0310c8f6 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.cpp
+++ b/launcher/minecraft/mod/ResourceFolderModel.cpp
@@ -426,7 +426,7 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
bool ResourceFolderModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
int row = index.row();
- if (row < 0 || row >= rowCount(index) || !index.isValid())
+ if (row < 0 || row >= rowCount(index.parent()) || !index.isValid())
return false;
if (role == Qt::CheckStateRole)