summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager_resource_providers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/task_manager_resource_providers.cc')
-rw-r--r--chrome/browser/task_manager_resource_providers.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index 5364b4d..0a992dd 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -40,6 +40,11 @@ TaskManagerWebContentsResource::~TaskManagerWebContentsResource() {
}
std::wstring TaskManagerWebContentsResource::GetTitle() const {
+ // GetTitle() and GetURL() can only be invoked when the WebContents has a
+ // controller.
+ if (!web_contents_->controller())
+ return std::wstring();
+
// Fall back on the URL if there's no title.
std::wstring tab_title(UTF16ToWideHack(web_contents_->GetTitle()));
if (tab_title.empty()) {