diff options
| author | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2020-02-28 16:42:17 +0000 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-03-01 11:50:40 +0100 |
| commit | eb3092f12140eae139bf0c82ab77d32cdf85cab5 (patch) | |
| tree | 2c27f095aef712c0e2abde7b9198077148c74966 /src/sqlite3_utils.cpp | |
| parent | 3c97d5b3a59f4ea26f5dfb98401b32d756480fb3 (diff) | |
| download | PROJ-eb3092f12140eae139bf0c82ab77d32cdf85cab5.tar.gz PROJ-eb3092f12140eae139bf0c82ab77d32cdf85cab5.zip | |
Avoid crash when running against SQLite3 binary built with -DSQLITE_OMIT_AUTOINIT (fixes #1932)
Diffstat (limited to 'src/sqlite3_utils.cpp')
| -rw-r--r-- | src/sqlite3_utils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sqlite3_utils.cpp b/src/sqlite3_utils.cpp index 3b1f1f8a..7006674f 100644 --- a/src/sqlite3_utils.cpp +++ b/src/sqlite3_utils.cpp @@ -135,6 +135,9 @@ static int VFSCustomAccess(sqlite3_vfs *vfs, const char *zName, int flags, std::unique_ptr<SQLite3VFS> SQLite3VFS::create(bool fakeSync, bool fakeLock, bool skipStatJournalAndWAL) { + // Call to sqlite3_initialize() is normally not needed, except for + // people building SQLite3 with -DSQLITE_OMIT_AUTOINIT + sqlite3_initialize(); sqlite3_vfs *defaultVFS = sqlite3_vfs_find(nullptr); assert(defaultVFS); |
