aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkRTree.cpp')
-rw-r--r--src/core/SkRTree.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index bae2fdce3f..4d1787e70d 100644
--- a/src/core/SkRTree.cpp
+++ b/src/core/SkRTree.cpp
@@ -7,7 +7,8 @@
#include "SkRTree.h"
-SkRTree::SkRTree(SkScalar aspectRatio) : fCount(0), fAspectRatio(aspectRatio) {}
+SkRTree::SkRTree(SkScalar aspectRatio)
+ : fCount(0), fAspectRatio(isfinite(aspectRatio) ? aspectRatio : 1) {}
SkRect SkRTree::getRootBound() const {
if (fCount) {