Unverified Commit aab7595e authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

Freecad: fix cursor.pcf font load crash (#412903)

parents fa7482c7 f1c4f54f
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
diff --git a/src/Gui/PreferencePages/DlgSettingsEditor.cpp b/src/Gui/PreferencePages/DlgSettingsEditor.cpp
index 0dda987..01568f1 100755
--- a/src/Gui/PreferencePages/DlgSettingsEditor.cpp
+++ b/src/Gui/PreferencePages/DlgSettingsEditor.cpp
@@ -288,7 +288,9 @@ void DlgSettingsEditor::loadSettings()
     QStringList fixedFamilyNames;
     for (const auto& name : familyNames) {
         if (QFontDatabase().isFixedPitch(name)) {
-            if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0) {
+            if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0
+                && name.compare(QLatin1String("cursor.pcf"), Qt::CaseInsensitive) != 0)
+              {
                 fixedFamilyNames.append(name);
             }
         }
@@ -298,7 +300,9 @@ void DlgSettingsEditor::loadSettings()
     QStringList fixedFamilyNames;
     for (const auto& name : familyNames) {
         if (QFontDatabase::isFixedPitch(name)) {
-            if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0) {
+            if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0
+                && name.compare(QLatin1String("cursor.pcf"), Qt::CaseInsensitive) != 0)
+              {
                 fixedFamilyNames.append(name);
             }
         }
+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ freecad-utils.makeCustomizable (
    patches = [
      ./0001-NIXOS-don-t-ignore-PYTHONPATH.patch
      ./0002-FreeCad-OndselSolver-pkgconfig.patch

      # https://github.com/FreeCAD/FreeCAD/pull/21710
      ./0003-FreeCad-fix-font-load-crash.patch
      (fetchpatch {
        url = "https://github.com/FreeCAD/FreeCAD/commit/8e04c0a3dd9435df0c2dec813b17d02f7b723b19.patch?full_index=1";
        hash = "sha256-H6WbJFTY5/IqEdoi5N+7D4A6pVAmZR4D+SqDglwS18c=";