Fix speech input bubble in GTK to avoid setting images when not visible.

The visibility of the speech input bubble was not being checked when a image was requested to be set. Consequently, this could lead to invalid image objects in some cases producing glib and GTK errors.

BUG=70223
TEST=none

Review URL: http://codereview.chromium.org/6272018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72501 0039d316-1c4b-4281-b951-d872f2087c98
parent c8de64a3
......@@ -196,7 +196,7 @@ void SpeechInputBubbleGtk::UpdateLayout() {
}
void SpeechInputBubbleGtk::SetImage(const SkBitmap& image) {
if (image.isNull())
if (image.isNull() || !info_bubble_)
return;
GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&image);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment