Initialize margin, which was being used uninitialized in compute_bounds()
authortomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 23 Mar 2012 14:46:48 +0000 (14:46 +0000)
committertomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 23 Mar 2012 14:46:48 +0000 (14:46 +0000)
on some code paths we apparently aren't exercising.
Caught by Matt Woodrow & gwright@kde.org

http://codereview.appspot.com/5519056/
http://code.google.com/p/skia/issues/detail?id=435

git-svn-id: http://skia.googlecode.com/svn/trunk@3474 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkDraw.cpp

index 7c3b060e03af4857c064e9e4176e80a59bfd3864..c118d1e75740c747fff670eb6242ff5153d69197 100644 (file)
@@ -2553,7 +2553,7 @@ static bool compute_bounds(const SkPath& devPath, const SkIRect* clipBounds,
         pathBounds.roundOut(bounds);
     }
 
-    SkIPoint margin;
+    SkIPoint margin = SkIPoint::Make(0, 0);
     if (filter) {
         SkASSERT(filterMatrix);