From 4b7f1b3c3918cd32070c72b6d8e95a888981c7a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 1 Feb 2010 14:44:12 +0000 Subject: [PATCH] * GuiDocument.cpp: before accessing the buffer() in paramsToDialog(), check if we have a bufferview() (fixes bug 6499) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33310 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 71eff5b92c..f0460dd279 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1823,6 +1823,8 @@ void GuiDocument::updateNumbering() void GuiDocument::updateDefaultFormat() { + if (!bufferview()) + return; // make a copy in order to consider unapplied changes Buffer * tmpbuf = const_cast(&buffer()); tmpbuf->params().useXetex = outputModule->xetexCB->isChecked(); @@ -2485,7 +2487,9 @@ void GuiDocument::paramsToDialog() } // Master/Child - std::vector children = buffer().getChildren(false); + std::vector children; + if (bufferview()) + children = buffer().getChildren(false); if (children.empty()) { masterChildModule->childrenTW->clear(); includeonlys_.clear(); @@ -3100,6 +3104,8 @@ void GuiDocument::loadModuleInfo() void GuiDocument::updateUnknownBranches() { + if (!bufferview()) + return; list used_branches; buffer().getUsedBranches(used_branches); list::const_iterator it = used_branches.begin(); -- 2.39.2