mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 1499758 - Fix potential null pointer deref in WebGLContext::GetVRFrame r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D12480 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
00d2226d66
commit
5eb9ef2267
@ -2328,6 +2328,9 @@ WebGLContext::GetVRFrame()
|
||||
already_AddRefed<layers::SharedSurfaceTextureClient>
|
||||
WebGLContext::GetVRFrame()
|
||||
{
|
||||
if (!gl)
|
||||
return nullptr;
|
||||
|
||||
EnsureVRReady();
|
||||
/**
|
||||
* Swap buffers as though composition has occurred.
|
||||
@ -2337,9 +2340,6 @@ WebGLContext::GetVRFrame()
|
||||
BeginComposition();
|
||||
EndComposition();
|
||||
|
||||
if (!gl)
|
||||
return nullptr;
|
||||
|
||||
gl::GLScreenBuffer* screen = gl->Screen();
|
||||
if (!screen)
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user