[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Nov 15 20:38:02 CET 2005


SVN commit 480620 by staikos:

fix crash on suse 9.3 systems in fontconfig - unable to trace the bug further,
but it's definitely the result of trying to set the current item in a
KFontCombo to a null qstring.


 M  +5 -1      kst.cpp  


--- trunk/extragear/graphics/kst/kst/kst.cpp #480619:480620
@@ -280,9 +280,13 @@
   checkFontPresent("Symbol");
   checkFontPresent("Helvetica");
 
-  QFont defaultFont; // QT's current default font
+  QFont defaultFont; // Qt's current default font
   QFontInfo info(defaultFont);
   _defaultFont = info.family();
+  // Null QString causes a crash in fontconfig on some systems.
+  if (_defaultFont.isNull()) {
+    _defaultFont = "helvetica";
+  }
 
   ExtensionMgr *mgr = ExtensionMgr::self();
   mgr->setWindow(this);


More information about the Kst mailing list