Commit 2935e1ba authored by sotaro's avatar sotaro
Browse files

Bug 1407149 - Add immediate context pointer check to d3d images r=nical

parent ca36fd23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ D3D11ShareHandleImage::GetAsSourceSurface()
  RefPtr<ID3D11DeviceContext> context;
  device->GetImmediateContext(getter_AddRefs(context));
  if (!context) {
    gfxCriticalError() << "Failed to get immediate context.";
    return nullptr;
  }

+8 −0
Original line number Diff line number Diff line
@@ -73,6 +73,10 @@ D3D11YCbCrImage::SetData(KnowsCompositor* aAllocator,

  RefPtr<ID3D11DeviceContext> ctx;
  allocator->GetDevice()->GetImmediateContext(getter_AddRefs(ctx));
  if (!ctx) {
    gfxCriticalError() << "Failed to get immediate context.";
    return false;
  }

  AutoLockD3D11Texture lockY(textureY);
  AutoLockD3D11Texture lockCb(textureCb);
@@ -189,6 +193,10 @@ D3D11YCbCrImage::GetAsSourceSurface()

  RefPtr<ID3D11DeviceContext> ctx;
  dev->GetImmediateContext(getter_AddRefs(ctx));
  if (!ctx) {
    gfxCriticalError() << "Failed to get immediate context.";
    return nullptr;
  }

  {
    AutoLockD3D11Texture lockY(texY);