Просмотр исходного кода

FolderWizard: fix crash when experimental feature are disabled

The _placeholderCheckBox only exists if the experimental features are enabled

Found via the crash reporter
https://sentry.io/owncloud/desktop-win-and-mac/issues/556407777/
Olivier Goffart 7 лет назад
Родитель
Сommit
3272f3b72b
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/gui/folderwizard.cpp
  2. 1 1
      src/gui/folderwizard.h

+ 1 - 1
src/gui/folderwizard.cpp

@@ -524,7 +524,7 @@ void FolderWizardSelectiveSync::initializePage()
 bool FolderWizardSelectiveSync::validatePage()
 {
     wizard()->setProperty("selectiveSyncBlackList", QVariant(_selectiveSync->createBlackList()));
-    wizard()->setProperty("usePlaceholders", QVariant(_placeholderCheckBox->isChecked()));
+    wizard()->setProperty("usePlaceholders", QVariant(_placeholderCheckBox && _placeholderCheckBox->isChecked()));
     return true;
 }
 

+ 1 - 1
src/gui/folderwizard.h

@@ -135,7 +135,7 @@ private slots:
 
 private:
     SelectiveSyncWidget *_selectiveSync;
-    QCheckBox *_placeholderCheckBox;
+    QCheckBox *_placeholderCheckBox = nullptr;
 };
 
 /**