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