009-06-16 Brent Fulgham <bfulgham@webkit.org>
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2009 20:27:16 +0000 (20:27 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2009 20:27:16 +0000 (20:27 +0000)
        Reviewed by Xan Lopez.

        Fixes https://bugs.webkit.org/show_bug.cgi?id=26453.
        Null Cairo contextwill crash Windows Cairo build.

        Test: fast/multicol/columns-shorthand-parsing.html

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp

index 785ebc2..5a4bc84 100644 (file)
@@ -1,3 +1,17 @@
+2009-06-16  Brent Fulgham  <bfulgham@webkit.org>
+
+        Reviewed by Xan Lopez.
+
+        Test: fast/multicol/columns-shorthand-parsing.html 
+
+        Fixes https://bugs.webkit.org/show_bug.cgi?id=26453.
+        Null Cairo contextwill crash Windows Cairo build.
+
+        * platform/graphics/win/GraphicsContextCairoWin.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::syncContext):
+          Add a check for null context before attempting to
+          retrieve the Cairo surface.
+
 2009-06-16  Peter Kasting  <pkasting@google.com>
 
         Reviewed by Xan Lopez.
index ca3cb5d..7d76794 100644 (file)
@@ -211,6 +211,9 @@ void GraphicsContextPlatformPrivate::concatCTM(const TransformationMatrix& trans
 
 void GraphicsContextPlatformPrivate::syncContext(PlatformGraphicsContext* cr)
 {
+    if (!cr)
+       return;
+
     cairo_surface_t* surface = cairo_get_target(cr);
     m_hdc = cairo_win32_surface_get_dc(surface);