mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:10:15 +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();
|
_compositeTexture.reset();
|
||||||
withPresentThreadLock([&] {
|
withPresentThreadLock([&] {
|
||||||
_currentFrame.reset();
|
_currentFrame.reset();
|
||||||
std::queue<gpu::FramePointer> empty;
|
while (!_newFrameQueue.empty()) {
|
||||||
_newFrameQueue.swap(empty);
|
_currentFrame = _newFrameQueue.front();
|
||||||
|
_currentFrame->preRender();
|
||||||
|
_newFrameQueue.pop();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue