File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ void QgsAbout::init()
8787 {
8888 line = stream.readLine (); // line of text excluding '\n'
8989 // ignore the line if it starts with a hash....
90- if ( line.at ( 0 ) == ' #' )
90+ if ( !line. isEmpty () && line.at ( 0 ) == ' #' )
9191 continue ;
9292 QStringList myTokens = line.split ( ' \t ' , QString::SkipEmptyParts );
9393 lines << myTokens[0 ];
@@ -119,7 +119,7 @@ void QgsAbout::init()
119119 {
120120 line = stream.readLine (); // line of text excluding '\n'
121121 // ignore the line if it starts with a hash....
122- if ( line.at ( 0 ) == ' #' )
122+ if ( !line. isEmpty () && line.at ( 0 ) == ' #' )
123123 continue ;
124124 lines += line;
125125 }
Original file line number Diff line number Diff line change @@ -1026,7 +1026,7 @@ QString QgsMapLayer::capitaliseLayerName( const QString& name )
10261026
10271027 QString layerName ( name );
10281028
1029- if ( capitaliseLayerName )
1029+ if ( capitaliseLayerName && !layerName. isEmpty () )
10301030 layerName = layerName.at ( 0 ).toUpper () + layerName.mid ( 1 );
10311031
10321032 return layerName;
You can’t perform that action at this time.
0 commit comments