Bug 1402370 nullptr cannot be cast to bool, so return false instead of nullptr in GLBlitHelperD3D.cpp draft
authorTom Ritter <tom@mozilla.com>
Fri, 22 Sep 2017 11:10:04 -0500
changeset 669163 3d030ff1b2b36e85e9abb24f50ebce668e4d86d6
parent 669161 543c1cbc2beab187a0878a5e07b350152cad3093
child 669164 12ebbd5a6393872f4bf87a0b52a97010e3ee4256
push id81235
push userbmo:tom@mozilla.com
push dateFri, 22 Sep 2017 16:11:08 +0000
bugs1402370
milestone58.0a1
Bug 1402370 nullptr cannot be cast to bool, so return false instead of nullptr in GLBlitHelperD3D.cpp MozReview-Commit-ID: EeboZBGD0Es
gfx/gl/GLBlitHelperD3D.cpp
old mode 100644
new mode 100755
--- a/gfx/gl/GLBlitHelperD3D.cpp
+++ b/gfx/gl/GLBlitHelperD3D.cpp
@@ -256,17 +256,17 @@ GLBlitHelper::BlitDescriptor(const layer
 
     const auto srcOrigin = OriginPos::BottomLeft;
     const gfx::IntRect clipRect(0, 0, clipSize.width, clipSize.height);
     const auto colorSpace = YUVColorSpace::BT601;
 
     if (format != gfx::SurfaceFormat::NV12) {
         gfxCriticalError() << "Non-NV12 format for SurfaceDescriptorD3D10: "
                            << uint32_t(format);
-        return nullptr;
+        return false;
     }
 
     const auto tex = OpenSharedTexture(d3d, handle);
     const RefPtr<ID3D11Texture2D> texList[2] = { tex, tex };
     const EGLAttrib postAttribs0[] = {
         LOCAL_EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG, 0,
         LOCAL_EGL_NONE
     };