Skip to content
Permalink
Browse files
fix runtime warning
  • 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.
@@ -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 );
@@ -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 );

0 comments on commit 749e2a5

Please sign in to comment.