浏览代码

Small changes

Kandrashin Denis 13 年之前
父节点
当前提交
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();
 }