Skip to content

Commit

Permalink
fix runtime warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 12, 2015
1 parent 24c95af commit 749e2a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -331,7 +331,10 @@ const QString QgsApplication::prefixPath()
{
if ( ABISYM( mRunningFromBuildDir ) )
{
qWarning( "!!! prefix path was requested, but it is not valid - we do not run from installed path !!!" );
static bool once = true;
if ( once )
qWarning( "!!! prefix path was requested, but it is not valid - we do not run from installed path !!!" );
once = false;
}

return ABISYM( mPrefixPath );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.cpp
Expand Up @@ -922,7 +922,7 @@ bool QgsMapLayer::loadNamedStyleFromDb( const QString &db, const QString &theURI

QgsDebugMsg( QString( "Trying to load style for \"%1\" from \"%2\"" ).arg( theURI ).arg( db ) );

if ( !QFile( db ).exists() )
if ( db.isEmpty() || !QFile( db ).exists() )
return false;

myResult = sqlite3_open_v2( db.toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
Expand Down

0 comments on commit 749e2a5

Please sign in to comment.