From c19c19111c79f6a0cadcc1ec00527c0f940edd60 Mon Sep 17 00:00:00 2001 From: "junov@chromium.org" Date: Tue, 12 Mar 2013 19:56:49 +0000 Subject: [PATCH] Fixing crash in render_pictures when failing to create referenceBitmap for --validate Review URL: https://codereview.chromium.org/12800002 git-svn-id: http://skia.googlecode.com/svn/trunk@8119 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/render_pictures_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp index 5d64e74bb..e5cb74eb9 100644 --- a/tools/render_pictures_main.cpp +++ b/tools/render_pictures_main.cpp @@ -163,7 +163,7 @@ static bool render_picture(const SkString& inputPath, const SkString* outputDir, success = render_picture(inputPath, NULL, referenceRenderer, &referenceBitmap); - if (!success || !referenceBitmap) { + if (!success || NULL == referenceBitmap || NULL == referenceBitmap->getPixels()) { SkDebugf("Failed to draw the reference picture.\n"); SkDELETE(bitmap); SkDELETE(referenceBitmap);