Skip to content

Commit 0417635

Browse files
committed
fix about box (followup 0b940ca, fixes #14832)
1 parent aa66bc6 commit 0417635

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/qgsabout.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

src/core/qgsmaplayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)