Fix use of NULL ptr in GrContext::drawRect

BUG=skia:3122
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/724443002
This commit is contained in:
bsalomon 2014-11-12 11:35:22 -08:00 committed by Commit bot
parent 06fc5cf206
commit 395ef0568d

View File

@ -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,