diff --git a/src/core/qgsmbtiles.cpp b/src/core/qgsmbtiles.cpp index 8a391791d438..cbcb4d9f1e3f 100644 --- a/src/core/qgsmbtiles.cpp +++ b/src/core/qgsmbtiles.cpp @@ -31,6 +31,9 @@ bool QgsMbTiles::open() if ( mDatabase ) return true; // already opened + if ( mFilename.isEmpty() ) + return false; + const sqlite3_database_unique_ptr database; const int result = mDatabase.open_v2( mFilename, SQLITE_OPEN_READONLY, nullptr ); if ( result != SQLITE_OK )