Skip to content

Commit 3b2a6e4

Browse files
Don't load sqlite3 id db path doesn't exist
1 parent 8ab7a8b commit 3b2a6e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/settings.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ FFvariant ffSettingsGetXFConf(FFinstance* instance, const char* channelName, con
271271

272272
#ifdef FF_HAVE_SQLITE3
273273
#include <sqlite3.h>
274+
#include <sys/stat.h>
274275

275276
typedef struct SQLiteData
276277
{
@@ -300,6 +301,9 @@ static const SQLiteData* getSQLiteData(const FFinstance* instance)
300301

301302
int ffSettingsGetSQLite3Int(const FFinstance* instance, const char* dbPath, const char* query)
302303
{
304+
if(!ffFileExists(dbPath, S_IFREG))
305+
return 0;
306+
303307
const SQLiteData* data = getSQLiteData(instance);
304308
if(data == NULL)
305309
return 0;

0 commit comments

Comments
 (0)