diff --git a/dtool/src/dtoolbase/deletedChain.T b/dtool/src/dtoolbase/deletedChain.T index b1b63d584f..60e2e6bf3e 100644 --- a/dtool/src/dtoolbase/deletedChain.T +++ b/dtool/src/dtoolbase/deletedChain.T @@ -258,7 +258,7 @@ init_lock() { //////////////////////////////////////////////////////////////////// template void DeletedChain:: -do_init_lock(MutexImpl *lock) { +do_init_lock(MutexImpl *&lock) { MutexImpl *new_lock = new MutexImpl; // Even though DELETED_CHAIN_USE_ATOMIC_EXCHANGE is not true, we diff --git a/dtool/src/dtoolbase/deletedChain.h b/dtool/src/dtoolbase/deletedChain.h index 87a801b83c..ee3e99af97 100644 --- a/dtool/src/dtoolbase/deletedChain.h +++ b/dtool/src/dtoolbase/deletedChain.h @@ -119,7 +119,7 @@ private: // If we don't have atomic compare-and-exchange, we need to use a // Mutex to protect the above linked list. static INLINE void init_lock(); - static void do_init_lock(MutexImpl *lock); + static void do_init_lock(MutexImpl *&lock); static MutexImpl *_lock; #endif };