check for non-invertible matrices in getClipBounds()



git-svn-id: http://skia.googlecode.com/svn/trunk@89 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 4088416..7298864 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -957,12 +957,14 @@
         return false;
     }
 
-    if (NULL != bounds) {
-        SkMatrix inverse;
-        SkRect   r;
+    SkMatrix inverse;
+    // if we can't invert the CTM, we can't return local clip bounds
+    if (!fMCRec->fMatrix->invert(&inverse)) {
+        return false;
+    }
 
-        fMCRec->fMatrix->invert(&inverse);
-        
+    if (NULL != bounds) {
+        SkRect   r;
         // get the clip's bounds
         const SkIRect& ibounds = clip.getBounds();
         // adjust it outwards if we are antialiasing