[Pkg-owncloud-commits] [owncloud-client] 27/94: Fix resizing crash when currentPage() is null

Sandro Knauß hefee at debian.org
Thu Mar 29 11:12:11 UTC 2018


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch upstream
in repository owncloud-client.

commit cdd8d109409934673a1daa9b9ace06b46635d48a
Author: Christian Kamm <mail at ckamm.de>
Date:   Tue Jan 9 11:41:39 2018 +0100

    Fix resizing crash when currentPage() is null
    
    Sentry:
    https://sentry.io/owncloud/desktop-win-and-mac/issues/425331770/
---
 src/gui/folderwizard.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gui/folderwizard.cpp b/src/gui/folderwizard.cpp
index 8e46065..187e07b 100644
--- a/src/gui/folderwizard.cpp
+++ b/src/gui/folderwizard.cpp
@@ -568,10 +568,12 @@ void FolderWizard::resizeEvent(QResizeEvent *event)
     QWizard::resizeEvent(event);
 
     // workaround for QTBUG-22819: when the error label word wrap, the minimum height is not adjusted
-    int hfw = currentPage()->heightForWidth(currentPage()->width());
-    if (currentPage()->height() < hfw) {
-        currentPage()->setMinimumSize(currentPage()->minimumSizeHint().width(), hfw);
-        setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
+    if (auto page = currentPage()) {
+        int hfw = page->heightForWidth(page->width());
+        if (page->height() < hfw) {
+            page->setMinimumSize(page->minimumSizeHint().width(), hfw);
+            setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
+        }
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list