Segmentation fault fixed

This commit is contained in:
Arin Alexander 2017-12-20 12:43:17 +03:00
parent 609393169c
commit 6a0faa5a68

View File

@ -1148,8 +1148,8 @@ QWidget* findRootWidget(QWidget* widget){
void BaseDesignIntf::showEditorDialog(){
QWidget *editor = defaultEditor();
editor->setStyleSheet(findRootWidget(scene()->views().at(0))->styleSheet());
if (editor) {
editor->setStyleSheet(findRootWidget(scene()->views().at(0))->styleSheet());
#ifdef Q_OS_WIN
editor->setAttribute(Qt::WA_DeleteOnClose);