diff options
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_theme_source.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_theme_source.cc b/chrome/browser/dom_ui/dom_ui_theme_source.cc index d98c313..2ce9cf5 100644 --- a/chrome/browser/dom_ui/dom_ui_theme_source.cc +++ b/chrome/browser/dom_ui/dom_ui_theme_source.cc @@ -148,7 +148,11 @@ void DOMUIThemeSource::SendThemeBitmap(int request_id, int resource_id) { DCHECK(tp); SkBitmap* image = tp->GetBitmapNamed(resource_id); - DCHECK(image); + if (!image || image->empty()) { + SendResponse(request_id, NULL); + return; + } + std::vector<unsigned char> png_bytes; PNGEncoder::EncodeBGRASkBitmap(*image, false, &png_bytes); |