diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 22:23:29 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 22:23:29 +0000 |
commit | 7ae7a1409240c228ab83136c7918de742950792b (patch) | |
tree | c674ee3b09a3e7ea57ff27ab8453fda9e488fe62 | |
parent | a43cd619a3919b6e868dbd63ca29e5af9072c2f5 (diff) | |
download | chromium_src-7ae7a1409240c228ab83136c7918de742950792b.zip chromium_src-7ae7a1409240c228ab83136c7918de742950792b.tar.gz chromium_src-7ae7a1409240c228ab83136c7918de742950792b.tar.bz2 |
Fix a crash in the history publisher. This is caused by me changing the
signature of ASCIIToWide to no longer take a string piece. This changed the
behavior for NULL handling (NULL is no longer supported).
This change just doesn't do any conversion if the source is NULL.
BUG=51185
TEST=none
Review URL: http://codereview.chromium.org/2819090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54980 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/history/history_publisher_win.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/history/history_publisher_win.cc b/chrome/browser/history/history_publisher_win.cc index 7ff7ccf..3a7a548 100644 --- a/chrome/browser/history/history_publisher_win.cc +++ b/chrome/browser/history/history_publisher_win.cc @@ -120,7 +120,10 @@ void HistoryPublisher::PublishDataToIndexers(const PageData& page_data) ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str()); ScopedBstr html(page_data.html); ScopedBstr title(page_data.title); - ScopedBstr format(ASCIIToWide(page_data.thumbnail_format).c_str()); + // Don't send a NULL string through ASCIIToWide. + ScopedBstr format(page_data.thumbnail_format ? + ASCIIToWide(page_data.thumbnail_format).c_str() : + NULL); ScopedVariant psa(thumbnail_arr.m_psa); for (size_t i = 0; i < indexers_.size(); ++i) { indexers_[i]->SendPageData(time, url, html, title, format, psa); |