more checks for null shapes in pictures



git-svn-id: http://skia.googlecode.com/svn/trunk@249 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleShapes.cpp b/samplecode/SampleShapes.cpp
index 95efd0f..07f2d00 100644
--- a/samplecode/SampleShapes.cpp
+++ b/samplecode/SampleShapes.cpp
@@ -90,9 +90,9 @@
         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