Skip to content

Commit

Permalink
fix about box (followup 0b940ca, fixes #14832)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 17, 2016
1 parent aa66bc6 commit 0417635
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsabout.cpp
Expand Up @@ -87,7 +87,7 @@ void QgsAbout::init()
{
line = stream.readLine(); // line of text excluding '\n'
//ignore the line if it starts with a hash....
if ( line.at( 0 ) == '#' )
if ( !line.isEmpty() && line.at( 0 ) == '#' )
continue;
QStringList myTokens = line.split( '\t', QString::SkipEmptyParts );
lines << myTokens[0];
Expand Down Expand Up @@ -119,7 +119,7 @@ void QgsAbout::init()
{
line = stream.readLine(); // line of text excluding '\n'
//ignore the line if it starts with a hash....
if ( line.at( 0 ) == '#' )
if ( !line.isEmpty() && line.at( 0 ) == '#' )
continue;
lines += line;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.cpp
Expand Up @@ -1026,7 +1026,7 @@ QString QgsMapLayer::capitaliseLayerName( const QString& name )

QString layerName( name );

if ( capitaliseLayerName )
if ( capitaliseLayerName && !layerName.isEmpty() )
layerName = layerName.at( 0 ).toUpper() + layerName.mid( 1 );

return layerName;
Expand Down

1 comment on commit 0417635

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jef-n !

Please sign in to comment.