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.
This commit is contained in:
Richard Heck 2016-02-20 22:14:51 -05:00
parent 89985bebf9
commit c498adf4db

View File

@ -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(