aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/animator/SkDrawBitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animator/SkDrawBitmap.cpp')
-rw-r--r--src/animator/SkDrawBitmap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/animator/SkDrawBitmap.cpp b/src/animator/SkDrawBitmap.cpp
index 2a482d7584..30af9dbd0e 100644
--- a/src/animator/SkDrawBitmap.cpp
+++ b/src/animator/SkDrawBitmap.cpp
@@ -190,9 +190,9 @@ void SkImageBaseBitmap::resolve() {
fBitmap.reset();
//SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str());
- SkStream* stream = new SkFILEStream(src.c_str());
-
- SkAutoTDelete<SkStream> autoDel(stream);
- SkImageDecoder::DecodeStream(stream, &fBitmap);
+ SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(src.c_str()));
+ if (stream.get()) {
+ SkImageDecoder::DecodeStream(stream, &fBitmap);
+ }
}
}