Chromium Code Reviews| Index: skia/ext/bitmap_platform_device_mac.cc |
| =================================================================== |
| --- skia/ext/bitmap_platform_device_mac.cc (revision 103145) |
| +++ skia/ext/bitmap_platform_device_mac.cc (working copy) |
| @@ -143,9 +143,11 @@ |
| } |
| #endif |
| - if (!context) |
| + if (!context) { |
| context = CGContextForData(data, width, height); |
| - else |
| + if (!context) |
| + return NULL; |
| + } else |
| CGContextRetain(context); |
| BitmapPlatformDevice* rv = new BitmapPlatformDevice( |