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

Unified Diff: ios/chrome/browser/web/navigation_manager_util.mm

Issue 2757073002: Cleanup of how -enableDesktopUserAgent uses NavigationManager utility. (Closed)
Patch Set: Added DCHECK Created 3 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
Index: ios/chrome/browser/web/navigation_manager_util.mm
diff --git a/ios/chrome/browser/web/navigation_manager_util.mm b/ios/chrome/browser/web/navigation_manager_util.mm
index bd9a43362b0f40494dd26b220f36ae661e96bc7d..81a61b908a3971ec7cd750e68af3db88e026bd86 100644
--- a/ios/chrome/browser/web/navigation_manager_util.mm
+++ b/ios/chrome/browser/web/navigation_manager_util.mm
@@ -10,7 +10,7 @@
web::NavigationItem* GetLastNonRedirectedItem(
web::NavigationManager* nav_manager) {
- if (!nav_manager->GetItemCount())
+ if (!nav_manager || !nav_manager->GetItemCount())
return nullptr;
int index = nav_manager->GetCurrentItemIndex();
web::NavigationItem* item = nullptr;
« no previous file with comments | « ios/chrome/browser/web/navigation_manager_util.h ('k') | ios/chrome/browser/web/navigation_manager_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698