Index: tools/viewer/SKPSlide.cpp |
diff --git a/tools/viewer/SKPSlide.cpp b/tools/viewer/SKPSlide.cpp |
index e24e1fdb048d35718b6cd32f3e497fd9dbf9e267..9419253f0c25a2aa4f0a238018e0790bb84c09c3 100644 |
--- a/tools/viewer/SKPSlide.cpp |
+++ b/tools/viewer/SKPSlide.cpp |
@@ -35,8 +35,8 @@ |
} |
static sk_sp<SkPicture> read_picture(const char path[]) { |
- 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; |
} |