]> git.lyx.org Git - features.git/commitdiff
Fix crash
authorKornel Benko <kornel@lyx.org>
Tue, 28 Sep 2021 08:32:02 +0000 (10:32 +0200)
committerKornel Benko <kornel@lyx.org>
Tue, 28 Sep 2021 08:33:24 +0000 (10:33 +0200)
Lyx crashes on export to pdf if used with sanitizer set to 'unspecified'.
Crash found by Scott.

Given that if we export without GUI, there is some weirdness here though.
1.) Why does lyx not crash if not using '-fsanitize' compile-option
2.) Why is export to pdf dependent on the screen-resolution

src/frontends/qt/GuiApplication.cpp

index 01a646de37372e84bc6b62219456b2d124859129..4161db50272b305a2aee95582916616d2eef64f4 100644 (file)
@@ -555,7 +555,7 @@ IconInfo iconInfo(FuncRequest const & f, bool unknown, bool rtl)
        if (unknown)
                names << "unknown";
 
-       search_mode const mode = theGuiApp()->imageSearchMode();
+       search_mode const mode = theGuiApp() ? theGuiApp()->imageSearchMode() : support::must_exist;
        // The folders where icons are searched for
        QStringList imagedirs;
        imagedirs << "images/ipa/" << "images/";