From dbfcd10097a6ffbe1a8248e0d7eb7b96aa40f047 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sun, 3 Mar 2024 18:04:47 +0800 Subject: [PATCH] Check parent variable nullness in folderstatusmodel Signed-off-by: Claudio Cambra --- src/gui/folderstatusmodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index cb4ae0d72b941..d0c0eba8e8eab 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -956,8 +956,7 @@ void FolderStatusModel::slotApplySelectiveSync() void FolderStatusModel::slotSetProgress(const ProgressInfo &progress) { - const auto parent = qobject_cast(QObject::parent()); - if (!parent->isVisible()) { + if (const auto parent = qobject_cast(QObject::parent()); !parent || !parent->isVisible()) { return; // for https://github.com/owncloud/client/issues/2648#issuecomment-71377909 }