| Index: chrome/browser/android/dev_tools_server.cc
|
| diff --git a/chrome/browser/android/dev_tools_server.cc b/chrome/browser/android/dev_tools_server.cc
|
| index af04acca20aa0553408bfe9a1b6af787dc956523..e41b65f943af41f471c4532c0a51ea29e65eb2a8 100644
|
| --- a/chrome/browser/android/dev_tools_server.cc
|
| +++ b/chrome/browser/android/dev_tools_server.cc
|
| @@ -188,6 +188,9 @@ class TabTarget : public TargetBase {
|
| if (!web_contents) {
|
| // The tab has been pushed out of memory, pull it back.
|
| TabAndroid* tab = model->GetTabAt(index);
|
| + if (!tab)
|
| + return NULL;
|
| +
|
| tab->LoadIfNeeded();
|
| web_contents = model->GetWebContentsAt(index);
|
| if (!web_contents)
|
| @@ -231,7 +234,7 @@ class TabTarget : public TargetBase {
|
| TabModel* model = *iter;
|
| for (int i = 0; i < model->GetTabCount(); ++i) {
|
| TabAndroid* tab = model->GetTabAt(i);
|
| - if (tab->GetAndroidId() == tab_id_) {
|
| + if (tab && tab->GetAndroidId() == tab_id_) {
|
| *model_result = model;
|
| *index_result = i;
|
| return true;
|
| @@ -363,6 +366,9 @@ class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
|
| TabModel* model = *iter;
|
| for (int i = 0; i < model->GetTabCount(); ++i) {
|
| TabAndroid* tab = model->GetTabAt(i);
|
| + if (!tab)
|
| + continue;
|
| +
|
| WebContents* web_contents = model->GetWebContentsAt(i);
|
| if (web_contents) {
|
| tab_web_contents.insert(web_contents);
|
|
|