aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-01-07 09:01:12 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-07 09:01:13 -0800
commit152f524fd325b7776b01f84afbfe2fa071648a05 (patch)
tree52255f53268067cf9e66272b67ca15711d8c4813 /src/gpu
parentbd0d9da981289504c9dcd8547eaad52b1f4a52cb (diff)
It is dangerous to ignore SkRect::intersect's return value
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrReducedClip.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 3040b46313..ca97098794 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -409,7 +409,10 @@ void GrReducedClip::ReduceClipStack(const SkClipStack& stack,
if (tighterBounds) {
SkIRect stackIBounds;
stackBounds.roundOut(&stackIBounds);
- tighterBounds->intersect(queryBounds, stackIBounds);
+ if (!tighterBounds->intersect(queryBounds, stackIBounds)) {
+ SkASSERT(0);
+ tighterBounds->setEmpty();
+ }
bounds = tighterBounds;
}
} else {