Broken dm fix
authorsugoi <sugoi@chromium.org>
Mon, 19 Jan 2015 18:31:35 +0000 (10:31 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 19 Jan 2015 18:31:35 +0000 (10:31 -0800)
BUG=skia:

Review URL: https://codereview.chromium.org/855953005

src/gpu/SkGr.cpp

index 18b27534bceca3550929900504004eb73d12cfb1..64142fe07e7acab7a9130fb95f36042e035b0292 100644 (file)
@@ -235,7 +235,7 @@ static GrTexture *load_yuv_texture(GrContext* ctx, bool cache, const GrTexturePa
         SkYUVPlanesCache::FindAndRef(pixelRef->getGenerationID(), &yuvInfo));
 
     void* planes[3];
-    if (cachedData->data()) {
+    if (cachedData && cachedData->data()) {
         planes[0] = (void*)cachedData->data();
         planes[1] = (uint8_t*)planes[0] + yuvInfo.fSizeInMemory[0];
         planes[2] = (uint8_t*)planes[1] + yuvInfo.fSizeInMemory[1];