fix warnings
Review URL: https://codereview.appspot.com/7073044
git-svn-id: http://skia.googlecode.com/svn/trunk@7064 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleRotateCircles.cpp b/samplecode/SampleRotateCircles.cpp
index 32a46a3..5bac6cf 100644
--- a/samplecode/SampleRotateCircles.cpp
+++ b/samplecode/SampleRotateCircles.cpp
@@ -249,11 +249,12 @@
SkPoint pos, tan;
for (SkScalar dist = 0; dist <= total; dist += delta) {
- (void)meas.getPosTan(dist, &pos, &tan);
- tan.scale(radius);
- tan.rotateCCW();
- canvas->drawLine(pos.x() + tan.x(), pos.y() + tan.y(),
- pos.x() - tan.x(), pos.y() - tan.y(), paint);
+ if (meas.getPosTan(dist, &pos, &tan)) {
+ tan.scale(radius);
+ tan.rotateCCW();
+ canvas->drawLine(pos.x() + tan.x(), pos.y() + tan.y(),
+ pos.x() - tan.x(), pos.y() - tan.y(), paint);
+ }
}
}