mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +02:00
- attempt to fix double free bug reported by tomreyn
This commit is contained in:
@@ -162,7 +162,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
}
|
||||
void ReleaseLock(bool keepMutex=false) {
|
||||
void ReleaseLock(bool keepMutex=false,bool deleteMutexOnRelease=false) {
|
||||
if(this->mutex != NULL) {
|
||||
#ifdef DEBUG_MUTEXES
|
||||
if(ownerId != "") {
|
||||
@@ -182,6 +182,11 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
if(deleteMutexOnRelease == true) {
|
||||
delete this->mutex;
|
||||
this->mutex = NULL;
|
||||
}
|
||||
|
||||
if(keepMutex == false) {
|
||||
this->mutex = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user