Index: bench/nanobench.cpp |
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp |
index 433cfa89d9cdde2998fa3b4923ee1c2baf555631..5db5137ffd6f1f288da6e607bf3919586a38aa10 100644 |
--- a/bench/nanobench.cpp |
+++ b/bench/nanobench.cpp |
@@ -645,8 +645,8 @@ |
return nullptr; |
} |
- std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path); |
- if (!stream) { |
+ SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path)); |
+ if (stream.get() == nullptr) { |
SkDebugf("Could not read %s.\n", path); |
return nullptr; |
} |