]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.cpp
Upstreaming compilation patch needed for Gentoo.
[lyx.git] / src / frontends / qt4 / GuiDocument.cpp
index 524ea399b0adf62f0618462e22f992175e23fce4..74c480787892eb3320343615766172daedbfb1fa 100644 (file)
 #include "frontends/alert.h"
 
 #include <QAbstractItemModel>
-#include <QHeaderView>
+#include <QButtonGroup>
 #include <QColor>
 #include <QColorDialog>
 #include <QCloseEvent>
 #include <QFontDatabase>
+#include <QHeaderView>
 #include <QScrollBar>
 #include <QTextBoundaryFinder>
 #include <QTextCursor>
@@ -4007,6 +4008,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";
 }