Hopefully fix the random crashes with threads
This commit is contained in:
parent
becbb7b525
commit
13efc1bb06
|
@ -794,8 +794,13 @@ public:
|
||||||
static int get_object_count();
|
static int get_object_count();
|
||||||
|
|
||||||
_FORCE_INLINE_ static bool instance_validate(Object *p_ptr) {
|
_FORCE_INLINE_ static bool instance_validate(Object *p_ptr) {
|
||||||
|
rw_lock->read_lock();
|
||||||
|
|
||||||
return instance_checks.has(p_ptr);
|
bool exists = instance_checks.has(p_ptr);
|
||||||
|
|
||||||
|
rw_lock->read_unlock();
|
||||||
|
|
||||||
|
return exists;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue