2009-06-17 Brent Fulgham <bfulgham@webkit.org>
[WebKit-https.git] / WebCore / platform / graphics / cairo / ImageCairo.cpp
index 7c34e6f..0a3479c 100644 (file)
@@ -157,6 +157,10 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, con
     if (!image) // If it's too early we won't have an image yet.
         return;
 
+    // Avoid NaN
+    if (!isfinite(phase.x()) || !isfinite(phase.y()))
+       return;
+
     cairo_t* cr = context->platformContext();
     context->save();