]> git.lyx.org Git - features.git/commitdiff
Fix crash when citeengine is unknown.
authorRichard Heck <rgheck@lyx.org>
Mon, 12 Feb 2018 21:26:27 +0000 (16:26 -0500)
committerRichard Heck <rgheck@lyx.org>
Mon, 12 Feb 2018 21:27:14 +0000 (16:27 -0500)
src/frontends/qt4/GuiDocument.cpp

index 85318bc7f0ab1058f37f62409e54b0ff432f8b53..8149b5070fba885f3582ad8a6dc7a40c4eafa56e 100644 (file)
@@ -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";
 }