mirror of
https://github.com/lubosz/overte.git
synced 2025-04-15 13:28:04 +02:00
Don't crash on plugin switch
This commit is contained in:
parent
02b4873ab0
commit
b10e2020a7
1 changed files with 5 additions and 2 deletions
|
@ -376,8 +376,11 @@ void OpenGLDisplayPlugin::uncustomizeContext() {
|
|||
_compositeTexture.reset();
|
||||
withPresentThreadLock([&] {
|
||||
_currentFrame.reset();
|
||||
std::queue<gpu::FramePointer> empty;
|
||||
_newFrameQueue.swap(empty);
|
||||
while (!_newFrameQueue.empty()) {
|
||||
_currentFrame = _newFrameQueue.front();
|
||||
_currentFrame->preRender();
|
||||
_newFrameQueue.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue