From cf62075e20a12d43c9a9de07411f4c0c1f47336d Mon Sep 17 00:00:00 2001 From: "robertshield@google.com" Date: Fri, 24 Apr 2009 17:05:40 +0000 Subject: Adding missing null check in case of missing file version info. Review URL: http://codereview.chromium.org/88041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14436 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/automation_provider.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chrome') diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index fce3a68..dc77b01 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -809,7 +809,10 @@ void AutomationProvider::ConnectToChannel(const std::wstring& channel_id) { true, g_browser_process->shutdown_event())); scoped_ptr file_version_info( FileVersionInfo::CreateFileVersionInfoForCurrentModule()); - std::string version_string(WideToASCII(file_version_info->file_version())); + std::string version_string; + if (file_version_info != NULL) { + version_string = WideToASCII(file_version_info->file_version()); + } // Send a hello message with our current automation protocol version. channel_->Send(new AutomationMsg_Hello(0, version_string.c_str())); -- cgit v1.1