Don't crash on plugin switch

This commit is contained in:
Brad Davis 2016-08-03 08:16:20 -07:00
parent 02b4873ab0
commit b10e2020a7

View file

@ -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();
}
});
}