| Index: chrome/browser/ui/views/infobars/translate_infobar_base.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/infobars/translate_infobar_base.cc (revision 65711)
|
| +++ chrome/browser/ui/views/infobars/translate_infobar_base.cc (working copy)
|
| @@ -136,11 +136,12 @@
|
| }
|
|
|
| TranslateInfoBarDelegate* TranslateInfoBarBase::GetDelegate() const {
|
| - return static_cast<TranslateInfoBarDelegate*>(delegate());
|
| + return delegate()->AsTranslateInfoBarDelegate();
|
| }
|
|
|
| const InfoBarBackground& TranslateInfoBarBase::GetBackground() const {
|
| - return GetDelegate()->IsError() ? error_background_ : normal_background_;
|
| + return (delegate() && GetDelegate()->IsError()) ?
|
| + error_background_ : normal_background_;
|
| }
|
|
|
| void TranslateInfoBarBase::FadeBackground(gfx::Canvas* canvas,
|
|
|