Fix crash when citeengine is unknown.

(cherry picked from commit 5ee3396459)
This commit is contained in:
Richard Heck 2018-02-12 16:26:27 -05:00
parent ceee86a824
commit 0dfca93139

View File

@ -4007,6 +4007,12 @@ bool GuiDocument::isBiblatex() const
biblioModule->citeEngineCO->itemData( biblioModule->citeEngineCO->itemData(
biblioModule->citeEngineCO->currentIndex()).toString(); 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"; return theCiteEnginesList[fromqstr(engine)]->getCiteFramework() == "biblatex";
} }