[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents

Jérôme Sonrier jsid at emor3j.fr.eu.org
Mon Jul 13 22:21:14 CEST 2009


SVN commit 996084 by jsonrier:

Avoid kstars to crash when a flag has no label.

CCMAIL: kstars-devel at kde.org



 M  +5 -2      flagcomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/flagcomponent.cpp #996083:996084
@@ -89,9 +89,12 @@
 
         imageFound = false;
 
-        // Continue if there is no label
-        if ( ! ( line.size() > 4 ) )
+        // If there is no label, use an empty string, red color and continue.
+        if ( ! ( line.size() > 4 ) ) {
+            m_Labels.append( "" );
+            m_LabelColors.append( QColor( "red" ) );
             continue;
+        }
 
         // Read label and color label
         // If the last word is a color value, use it to set label color


More information about the Kstars-devel mailing list