aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod
diff options
context:
space:
mode:
authorTheLastRar <TheLastRar@users.noreply.github.com>2022-11-14 19:04:41 +0000
committerTheLastRar <TheLastRar@users.noreply.github.com>2022-11-14 19:05:57 +0000
commitaef5349aee82922fb7cedab7489bc84766453700 (patch)
tree2305fc20ad37f2f665b5b8f1d1bd477124efcea4 /launcher/minecraft/mod
parentac993aa31fcab79473f62c2d958b91e921b6930e (diff)
downloadPrismLauncher-aef5349aee82922fb7cedab7489bc84766453700.tar.gz
PrismLauncher-aef5349aee82922fb7cedab7489bc84766453700.tar.bz2
PrismLauncher-aef5349aee82922fb7cedab7489bc84766453700.zip
Pass index.parent() as parent parameter for rowCount
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod')
-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)