Add some code changes/fixes proposed by Coverity and Clang Tidy

This commit is contained in:
qarmin
2019-08-07 12:54:30 +02:00
parent 045ab51ae5
commit e0b5b21863
26 changed files with 65 additions and 58 deletions

View File

@ -539,6 +539,10 @@ void PoolAllocator::unlock(ID p_mem) {
return;
mt_lock();
Entry *e = get_entry(p_mem);
if (!e) {
mt_unlock();
ERR_FAIL_COND(!e);
}
if (e->lock == 0) {
mt_unlock();
ERR_PRINT("e->lock == 0");