diff options
author | drh <drh@noemail.net> | 2010-05-01 11:19:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-05-01 11:19:07 +0000 |
commit | 7aba8fdef78724c09a89d382cb4373fbedf69d91 (patch) | |
tree | 7e95b7a4bc185a521bfa1dcfce5234d7e2cac1ee /src | |
parent | bb16ff75dd0b2e840f97e27cb0756faf5f3d20b0 (diff) | |
download | sqlite-7aba8fdef78724c09a89d382cb4373fbedf69d91.tar.gz sqlite-7aba8fdef78724c09a89d382cb4373fbedf69d91.zip |
Fix the sqlite3_mutex_alloc() interface to return NULL (not segfault) when
operating in threadsafe mode. (This is a general-purpose bug fix which
really ought to be ported to trunk.)
FossilOrigin-Name: 64840a3caf569959c9d5e63bdbc0cf675fda3882
Diffstat (limited to 'src')
-rw-r--r-- | src/mutex.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mutex.c b/src/mutex.c index 11d498c47..edddaf101 100644 --- a/src/mutex.c +++ b/src/mutex.c @@ -77,6 +77,7 @@ int sqlite3MutexEnd(void){ ** Retrieve a pointer to a static mutex or allocate a new dynamic one. */ sqlite3_mutex *sqlite3_mutex_alloc(int id){ + if( !sqlite3GlobalConfig.bCoreMutex ) return 0; #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif |