Index: src/lazy/SkCachingPixelRef.cpp |
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp |
index dc53a5d6c78c7cf651f545a32482d23500d78633..5fc0d2a87fa7180e88ed3404c175ee0750cf2f5e 100644 |
--- a/src/lazy/SkCachingPixelRef.cpp |
+++ b/src/lazy/SkCachingPixelRef.cpp |
@@ -11,11 +11,12 @@ |
bool SkCachingPixelRef::Install(SkImageGenerator* generator, |
SkBitmap* dst) { |
- SkImageInfo info; |
SkASSERT(dst != NULL); |
- if ((NULL == generator) |
- || !(generator->getInfo(&info)) |
- || !dst->setInfo(info)) { |
+ if (NULL == generator) { |
+ return false; |
+ } |
+ const SkImageInfo info = generator->getInfo(); |
+ if (!dst->setInfo(info)) { |
SkDELETE(generator); |
return false; |
} |