REGRESSION(r227594) [WinCairo] NULL pointer crash in GraphicsContext::getWindowsContext
[WebKit-https.git] / Source / WebCore / platform / graphics / win / GraphicsContextCairoWin.cpp
index 5647d88..2cd5223 100644 (file)
@@ -126,9 +126,9 @@ static void drawBitmapToContext(PlatformContextCairo& platformContext, const DIB
     cairo_restore(cr);
 }
 
-void GraphicsContext::releaseWindowsContext(HDC hdc, const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
+void GraphicsContext::releaseWindowsContext(HDC hdc, const IntRect& dstRect, bool supportAlphaBlend)
 {
-    bool createdBitmap = mayCreateBitmap && (!m_data->m_hdc || isInTransparencyLayer());
+    bool createdBitmap = m_impl || !m_data->m_hdc || isInTransparencyLayer();
     if (!hdc || !createdBitmap) {
         m_data->restore();
         return;