mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user