Fixes bugs found by Sonarcloud and Coverity
This commit is contained in:
@ -268,7 +268,10 @@ void MessageQueue::flush() {
|
||||
//using reverse locking strategy
|
||||
_THREAD_SAFE_LOCK_
|
||||
|
||||
ERR_FAIL_COND(flushing); //already flushing, you did something odd
|
||||
if (flushing) {
|
||||
_THREAD_SAFE_UNLOCK_
|
||||
ERR_FAIL_COND(flushing); //already flushing, you did something odd
|
||||
}
|
||||
flushing = true;
|
||||
|
||||
while (read_pos < buffer_end) {
|
||||
|
||||
Reference in New Issue
Block a user