Browse Source

Small changes

Kandrashin Denis 13 năm trước cách đây
mục cha
commit
3af61c7887
1 tập tin đã thay đổi với 7 bổ sung3 xóa
  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();
 }