1
0
Kandrashin Denis 13 жил өмнө
parent
commit
3af61c7887
1 өөрчлөгдсөн 7 нэмэгдсэн , 3 устгасан
  1. 7 3
      source/fb2main.cpp

+ 7 - 3
source/fb2main.cpp

@@ -415,9 +415,13 @@ void Fb2MainWindow::createHead()
 {
     if (headTree) return;
     headTree = new QTreeView(this);
-    textEdit->setParent(NULL);
-    setCentralWidget(headTree);
-    textEdit->setParent(this);
+    if (textEdit) {
+        textEdit->setParent(NULL);
+        setCentralWidget(headTree);
+        textEdit->setParent(this);
+    } else {
+        setCentralWidget(headTree);
+    }
     headTree->setFocus();
 }