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

Unified Diff: chrome/browser/ui/browser_synced_window_delegate.cc

Issue 7518030: Fix crashing bug with session sync enabled and opening developer tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nit Created 9 years, 5 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: chrome/browser/ui/browser_synced_window_delegate.cc
diff --git a/chrome/browser/ui/browser_synced_window_delegate.cc b/chrome/browser/ui/browser_synced_window_delegate.cc
index d9a0947bc7e1de0f3577c5e724cb61fa39c5f227..91cb75c8f4c2a9f22c1cb78010043dfbcb08a1c6 100644
--- a/chrome/browser/ui/browser_synced_window_delegate.cc
+++ b/chrome/browser/ui/browser_synced_window_delegate.cc
@@ -29,7 +29,9 @@ const std::set<browser_sync::SyncedWindowDelegate*>
const browser_sync::SyncedWindowDelegate*
browser_sync::SyncedWindowDelegate::FindSyncedWindowDelegateWithId(
SessionID::id_type id) {
- return BrowserList::FindBrowserWithID(id)->synced_window_delegate();
+ Browser* browser = BrowserList::FindBrowserWithID(id);
+ // In case we don't find the browser (e.g. for Developer Tools).
+ return browser ? browser->synced_window_delegate() : NULL;
}
// BrowserSyncedWindowDelegate implementations
« 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