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

Unified Diff: ios/chrome/browser/infobars/infobar_container_ios.mm

Issue 1038903003: Fix crash occurring during infobar dismissal at BVC deletion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: v2 Created 5 years, 9 months 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: ios/chrome/browser/infobars/infobar_container_ios.mm
diff --git a/ios/chrome/browser/infobars/infobar_container_ios.mm b/ios/chrome/browser/infobars/infobar_container_ios.mm
index bd1223b3784b882b6b0b16165258afddd5027418..2919449b6e254c72f296c0731fd7d8b28fde020b 100644
--- a/ios/chrome/browser/infobars/infobar_container_ios.mm
+++ b/ios/chrome/browser/infobars/infobar_container_ios.mm
@@ -22,6 +22,7 @@ InfoBarContainerIOS::InfoBarContainerIOS(
}
InfoBarContainerIOS::~InfoBarContainerIOS() {
+ delegate_ = nullptr;
RemoveAllInfoBarsForDestruction();
}
@@ -44,7 +45,7 @@ void InfoBarContainerIOS::PlatformSpecificRemoveInfoBar(
// Otherwise, the infobar is being replaced by another one. Do not call the
// delegate in this case, as the delegate will be updated when the new infobar
// is added.
- if (infobar->total_height() == 0)
+ if (infobar->total_height() == 0 && delegate_)
delegate_->InfoBarContainerStateChanged(false);
// TODO(rohitrao, jif): [Merge 239355] Upstream InfoBarContainer deletes the
« 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