1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix threaded OpenGL lockup when trying to remove invalid buffer

This commit is contained in:
fzurita 2019-10-13 21:40:11 -04:00 committed by Sergey Lipskiy
parent b261f34b0d
commit 1384584af6

View File

@ -139,10 +139,12 @@ const char* RingBufferPool::getBufferFromPool(PoolBufferPointer _poolBufferPoint
void RingBufferPool::removeBufferFromPool(PoolBufferPointer _poolBufferPointer)
{
std::unique_lock<std::mutex> lock(m_mutex);
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
m_full = false;
m_condition.notify_one();
if (_poolBufferPointer.isValid()) {
std::unique_lock<std::mutex> lock(m_mutex);
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
m_full = false;
m_condition.notify_one();
}
}
}