diff options
author | 2009-07-03 02:52:27 +0000 | |
---|---|---|
committer | 2009-07-03 02:52:27 +0000 | |
commit | 8433b5db1a0f94cd92d2606817d5374ab899b87a (patch) | |
tree | 361e06f838515e6b70b470a43df46c8a22b5a610 /samplecode | |
parent | 1c12abe3508cd69615c2dd50653f782835e325ce (diff) |
more checks for null shapes in pictures
git-svn-id: http://skia.googlecode.com/svn/trunk@249 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleShapes.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samplecode/SampleShapes.cpp b/samplecode/SampleShapes.cpp index 95efd0fb48..07f2d0037c 100644 --- a/samplecode/SampleShapes.cpp +++ b/samplecode/SampleShapes.cpp @@ -90,9 +90,9 @@ protected: pict.serialize(&ostream); SkMemoryStream istream(ostream.getStream(), ostream.getOffset()); - SkPicture newPict(&istream); - - canvas->drawPicture(newPict); + SkPicture* newPict = new SkPicture(&istream); + canvas->drawPicture(*newPict); + newPict->unref(); #else canvas->drawPicture(pict); #endif |