Commit af7f301f by Stanislav Chiknavaryan Committed by Commit Bot

Handle nullptr mSwapChain in SwapChain11::getSyncValues

There are 6 crashes in SwapChain11::getSyncValues on crash server. I looked at one of them and it is due to a nullptr mSwapChain which appears to be a valid state that is handled in other SwapChain11 methods. This change adds a similar check / returning an error to SwapChain11::getSyncValues. BUG=angleproject:1402 Change-Id: I9c17b884704b8aaaddf2d802911cd0ca961ae0b4 Reviewed-on: https://chromium-review.googlesource.com/402613Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Stanislav Chiknavaryan <stanisc@chromium.org>
parent 81c6b577
......@@ -893,6 +893,11 @@ void SwapChain11::recreate()
egl::Error SwapChain11::getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc)
{
if (!mSwapChain)
{
return egl::Error(EGL_NOT_INITIALIZED, "Swap chain uninitialized");
}
DXGI_FRAME_STATISTICS stats = {};
HRESULT result = mSwapChain->GetFrameStatistics(&stats);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment