summaryrefslogtreecommitdiff
path: root/src/categoriesdialog.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-12-03 09:04:41 +0100
committerGitHub <noreply@github.com>2023-12-03 09:04:41 +0100
commit783c05478f45fdbc08fcc1243a29ace2c5ec21fa (patch)
tree1b01705fd94464992fcd04546f1eb5793a0fe8ff /src/categoriesdialog.cpp
parent04eff9750f0ebce85c64046cbf7d0198a4746247 (diff)
parent0315a88bd812fc92c82dc6a92e852a1ec547d006 (diff)
Merge pull request #1937 from ModOrganizer2/null-category-fix
Null category fix
Diffstat (limited to 'src/categoriesdialog.cpp')
-rw-r--r--src/categoriesdialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/categoriesdialog.cpp b/src/categoriesdialog.cpp
index ff226286..f4515da5 100644
--- a/src/categoriesdialog.cpp
+++ b/src/categoriesdialog.cpp
@@ -148,8 +148,9 @@ void CategoriesDialog::commitChanges()
for (int i = 0; i < ui->categoriesTable->rowCount(); ++i) {
int index = ui->categoriesTable->verticalHeader()->logicalIndex(i);
- QVariantList nexusData =
- ui->categoriesTable->item(index, 3)->data(Qt::UserRole).toList();
+ QVariantList nexusData;
+ if (ui->categoriesTable->item(index, 3) != nullptr)
+ nexusData = ui->categoriesTable->item(index, 3)->data(Qt::UserRole).toList();
std::vector<CategoryFactory::NexusCategory> nexusCats;
for (auto nexusCat : nexusData) {
nexusCats.push_back(CategoryFactory::NexusCategory(