fix about box (followup 0b940cac, fixes #14832)

This commit is contained in:
Juergen E. Fischer 2016-05-17 22:01:43 +02:00
parent aa66bc6a20
commit 04176350ec
2 changed files with 3 additions and 3 deletions

View File

@ -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];
@ -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;
}

View File

@ -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;