]> 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>
Tue, 13 Feb 2018 04:31:42 +0000 (23:31 -0500)
(cherry picked from commit 5ee3396459602e0982234cab064c5c960af7e4fc)

src/frontends/qt4/GuiDocument.cpp

index 524ea399b0adf62f0618462e22f992175e23fce4..09203781f0080a32dee27dfc67113478258d5552 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";
 }