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

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 100172: Avoid null ptr access in AutomationProvider::GetTabTitle(), fixes http://crbug.com/11132,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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/automation/automation_provider.cc
===================================================================
--- chrome/browser/automation/automation_provider.cc (revision 14861)
+++ chrome/browser/automation/automation_provider.cc (working copy)
@@ -1747,7 +1747,11 @@
*title_string_size = -1; // -1 is the error code
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
- *title = UTF16ToWideHack(tab->GetActiveEntry()->title());
+ NavigationEntry* entry = tab->GetActiveEntry();
+ *title = std::wstring();
+ if (entry != NULL) {
+ *title = UTF16ToWideHack(entry->title());
+ }
*title_string_size = static_cast<int>(title->size());
}
}
« 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