Index: chrome/browser/extensions/api/tabs/tabs_api.cc |
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc |
index a9ccfbb2cfeec649ab03b3f3230f17bb225eedfb..928175910b0f15332d17d3f5169d3c50d6e5874b 100644 |
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc |
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc |
@@ -939,6 +939,10 @@ ExtensionFunction::ResponseAction TabsQueryFunction::Run() { |
if (index > -1 && i != index) |
continue; |
+ if (!web_contents) { |
+ continue; |
+ } |
+ |
if (!MatchesBool(params->query_info.highlighted.get(), |
tab_strip->IsTabSelected(i))) { |
continue; |