Index: tools/Resources.cpp |
diff --git a/tools/Resources.cpp b/tools/Resources.cpp |
index 899f5d2bc4332321941777bdf43f2fc1e3888851..9c12a67c20a3250c0b9c99cd1b46918e7427596b 100644 |
--- a/tools/Resources.cpp |
+++ b/tools/Resources.cpp |
@@ -41,12 +41,11 @@ sk_sp<SkImage> GetResourceAsImage(const char* resource) { |
SkStreamAsset* GetResourceAsStream(const char* resource) { |
SkString resourcePath = GetResourcePath(resource); |
SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(resourcePath.c_str())); |
- if (stream->isValid()) { |
- return stream.release(); |
- } else { |
+ if (!stream->isValid()) { |
SkDebugf("Resource %s not found.\n", resource); |
return nullptr; |
} |
+ return stream.release(); |
} |
sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource) { |