Am Montag, den 12.02.2018, 16:31 -0500 schrieb Richard Heck: > > src/frontends/qt4/GuiDocument.cpp | 6 ++++++ > > 1 files changed, 6 insertions(+), 0 deletions(-) > > > > diff --git a/src/frontends/qt4/GuiDocument.cpp > > b/src/frontends/qt4/GuiDocument.cpp > > index 85318bc..8149b50 100644 > > --- a/src/frontends/qt4/GuiDocument.cpp > > +++ b/src/frontends/qt4/GuiDocument.cpp > > @@ -4007,6 +4007,12 @@ bool GuiDocument::isBiblatex() const > > biblioModule->citeEngineCO->itemData( > > biblioModule->citeEngineCO- > > >currentIndex()).toString(); > > > > + // this can happen if the cite engine is unknown, which > > can happen > > + // if one is using a file that came from someone else, > > etc. in that > > + // case, we crash if we proceed. > > + if (engine.isEmpty()) > > + return false; > > + > > return theCiteEnginesList[fromqstr(engine)]- > > >getCiteFramework() == "biblatex"; > > } > >
I wonder how that happens. Anyway, would be the following more safe (if we have an unknown non-empty string)? return theCiteEnginesList[fromqstr(engine)] && theCiteEnginesList[fromqstr(engine)]->getCiteFramework() == "biblatex"; This should also cover the empty case. Jürgen
signature.asc
Description: This is a digitally signed message part