Index: chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc |
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc |
index 8d174be00050aed8bdda1365f2096636ffc1b358..98a81489b270d96063e07dee1462273c11d6f267 100644 |
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc |
@@ -177,6 +177,13 @@ void PasswordGenerationPopupControllerImpl::Show(bool display_password) { |
if (!view_) { |
view_ = PasswordGenerationPopupView::Create(this); |
+ |
+ // Treat popup as being hidden if creation fails. |
+ if (!view_) { |
+ Hide(); |
+ return; |
+ } |
+ |
CalculateBounds(); |
view_->Show(); |
} else { |