aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-12 11:35:22 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-12 11:35:22 -0800
commit395ef0568dac793020f66cbec4b6ef86736d4db0 (patch)
treeb5aee40d46d3e893ad381ef53fde88600ac956af /src
parent06fc5cf206cbd7b9f2af4fb4176df4bf54cdcf8a (diff)
Fix use of NULL ptr in GrContext::drawRect
BUG=skia:3122 TBR=mtklein@google.com Review URL: https://codereview.chromium.org/724443002
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gpu/GrContext.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index da35033b77..3a93404af1 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -766,17 +766,14 @@ void GrContext::drawRect(const GrPaint& paint,
!target->getDrawState().getRenderTarget()->isMultisampled();
bool doAA = needAA && apply_aa_to_rect(target, rect, width, matrix, &devBoundRect);
- const SkStrokeRec& strokeRec = strokeInfo->getStrokeRec();
-
if (doAA) {
GrDrawState::AutoViewMatrixRestore avmr;
if (!avmr.setIdentity(target->drawState())) {
return;
}
if (width >= 0) {
- fAARectRenderer->strokeAARect(target, rect,
- matrix, devBoundRect,
- strokeRec);
+ const SkStrokeRec& strokeRec = strokeInfo->getStrokeRec();
+ fAARectRenderer->strokeAARect(target, rect, matrix, devBoundRect, strokeRec);
} else {
// filled AA rect
fAARectRenderer->fillAARect(target,