Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: chrome/browser/ui/views/script_bubble_view.cc

Issue 11435002: Fix crash in Script Bubble View when images fail to load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/script_bubble_view.cc
===================================================================
--- chrome/browser/ui/views/script_bubble_view.cc (revision 170751)
+++ chrome/browser/ui/views/script_bubble_view.cc (working copy)
@@ -186,8 +186,10 @@
void ScriptBubbleView::OnImageLoaded(size_t index,
const gfx::Image& image) {
- const gfx::ImageSkia* image_skia = image.ToImageSkia();
- entries_[index].extension_imageview->SetImage(image_skia);
+ if (!image.IsEmpty()) {
+ const gfx::ImageSkia* image_skia = image.ToImageSkia();
+ entries_[index].extension_imageview->SetImage(image_skia);
+ }
}
ScriptBubbleController* ScriptBubbleView::GetScriptBubbleController() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698