Index: chrome/browser/sync/glue/session_model_associator.cc |
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc |
index 798db3a965c303ad16c5cbc22b4db6e9e4e55d31..269d12c778547aa7162e260c0fe5ed1625830afc 100644 |
--- a/chrome/browser/sync/glue/session_model_associator.cc |
+++ b/chrome/browser/sync/glue/session_model_associator.cc |
@@ -237,10 +237,10 @@ bool SessionModelAssociator::AssociateWindows(bool reload_tabs, |
if (reload_tabs) { |
SyncedTabDelegate* tab = (*i)->GetTabAt(j); |
- // It's possible for GetTabAt to return a null tab if it's not in |
- // memory. We can assume this means the tab already existed but hasn't |
- // changed, so no need to reassociate. |
- if (tab && !AssociateTab(*tab, error)) { |
+ // It's possible for GetTabAt to return a null tab or a tab which has |
+ // no web contents. We can assume this means the tab already existed |
+ // but hasn't changed, so no need to reassociate. |
+ if (tab && tab->HasWebContents() && !AssociateTab(*tab, error)) { |
Yaron
2013/05/21 18:32:07
I believe the existence-check for tab was purely f
shashi
2013/05/21 23:11:21
Done.
|
// Association failed. Either we need to re-associate, or this is an |
// unrecoverable error. |
return false; |