commit c498adf4db4c55c3bd58f976df315cf7568702d2
Author: Richard Heck <[email protected]>
Date: Sat Feb 20 22:14:51 2016 -0500
Fix bug reported on the list by Philip Pirrip. It is possible that
paramsToDialog is called when we do not have a BufferView and so do
not have a Buffer.
diff --git a/src/frontends/qt4/GuiDocument.cpp
b/src/frontends/qt4/GuiDocument.cpp
index 60aee1c..f76f724 100644
--- a/src/frontends/qt4/GuiDocument.cpp
+++ b/src/frontends/qt4/GuiDocument.cpp
@@ -3039,7 +3039,10 @@ void GuiDocument::paramsToDialog()
biblioChanged_ = false;
// indices
- indicesModule->update(bp_, buffer().isReadonly());
+ // We may be called when there is no BufferView and so no Buffer,
+ // e.g., when the last view has just been closed.
+ bool const isReadOnly = buffer() ? buffer().isReadonly() : false;
+ indicesModule->update(bp_, isReadOnly);
// language & quotes
int const pos = langModule->languageCO->findData(toqstr(