| Index: src/core/SkPicture.cpp
|
| diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
|
| index a1aa35e61e09f1447e65f70271d9c49cd3db46d6..18e229ca233f182effd9168f241fd1641e6400d3 100644
|
| --- a/src/core/SkPicture.cpp
|
| +++ b/src/core/SkPicture.cpp
|
| @@ -310,7 +310,12 @@ SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc pro
|
| SkPicturePlayback* playback;
|
| // Check to see if there is a playback to recreate.
|
| if (stream->readBool()) {
|
| - playback = SkNEW_ARGS(SkPicturePlayback, (stream, info, proc));
|
| + bool isValid = false;
|
| + playback = SkNEW_ARGS(SkPicturePlayback, (stream, info, &isValid, proc));
|
| + if (!isValid) {
|
| + SkDELETE(playback);
|
| + return NULL;
|
| + }
|
| } else {
|
| playback = NULL;
|
| }
|
|
|