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

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: 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..cc95ac6e80dd94c397f66a1de90a7c212a2cc041 100644
--- a/chrome/browser/ui/browser_synced_window_delegate.cc
+++ b/chrome/browser/ui/browser_synced_window_delegate.cc
@@ -29,7 +29,12 @@ 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).
+ if (browser) {
sky 2011/08/01 20:26:10 nit: return browser ? browser->... : NULL
+ return browser->synced_window_delegate();
+ }
+ return 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