diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 23:19:02 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 23:19:02 +0000 |
commit | 391e9fb4747f68ef80beb4e42536633c509bdd7a (patch) | |
tree | 151de672aa3b26dd745f2f84daff1fca4ede8411 /printing/backend/win_helper.cc | |
parent | a24bee52b57a70e9e1f18fa72ce67bb5d74ff796 (diff) | |
download | chromium_src-391e9fb4747f68ef80beb4e42536633c509bdd7a.zip chromium_src-391e9fb4747f68ef80beb4e42536633c509bdd7a.tar.gz chromium_src-391e9fb4747f68ef80beb4e42536633c509bdd7a.tar.bz2 |
Fixed null pointer exception.
TBR=gene@chromium.org
BUG=119852
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9839077
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/backend/win_helper.cc')
-rw-r--r-- | printing/backend/win_helper.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/printing/backend/win_helper.cc b/printing/backend/win_helper.cc index 8bcb45e..9166c96 100644 --- a/printing/backend/win_helper.cc +++ b/printing/backend/win_helper.cc @@ -359,9 +359,11 @@ std::string GetDriverInfo(HANDLE printer) { scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfo( FilePath(driver->pDriverPath))); - info[1] = WideToUTF8(version_info->file_version()); - info[2] = WideToUTF8(version_info->product_name()); - info[3] = WideToUTF8(version_info->product_version()); + if (version_info.get()) { + info[1] = WideToUTF8(version_info->file_version()); + info[2] = WideToUTF8(version_info->product_name()); + info[3] = WideToUTF8(version_info->product_version()); + } } for (size_t i = 0; i < arraysize(info); ++i) { |