Skip to content
Permalink
Browse files

fix runtime warning

  • Loading branch information
jef-n committed Feb 12, 2015
1 parent 24c95af commit 749e2a5bdb45780b88b6d9209758ae89ced18fdc
Showing with 5 additions and 2 deletions.
  1. +4 −1 src/core/qgsapplication.cpp
  2. +1 −1 src/core/qgsmaplayer.cpp
@@ -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.
You can’t perform that action at this time.