Fix regression in GrXferProcessor
Fix segfault introduced in https://codereview.chromium.org/1170553002/
BUG=skia:
Review URL: https://codereview.chromium.org/1167243002
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 837e13e..67c5dd8 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -67,11 +67,11 @@
void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t key = this->willReadDstColor() ? 0x1 : 0x0;
if (key) {
- if (this->getDstTexture()) {
+ if (const GrTexture* dstTexture = this->getDstTexture()) {
key |= 0x2;
- }
- if (kTopLeft_GrSurfaceOrigin == this->getDstTexture()->origin()) {
- key |= 0x4;
+ if (kTopLeft_GrSurfaceOrigin == dstTexture->origin()) {
+ key |= 0x4;
+ }
}
if (this->readsCoverage()) {
key |= 0x8;