1
0
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:
drh
2010-05-01 11:19:07 +00:00
parent bb16ff75dd
commit 7aba8fdef7
3 changed files with 19 additions and 8 deletions

View File

@@ -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