Skip to content

Commit

Permalink
arc: Fix crash on SetWallpaper().
Browse files Browse the repository at this point in the history
BUG=chromium:618922
TEST=Tested manually.

Review-Url: https://codereview.chromium.org/2077333002
Cr-Commit-Position: refs/heads/master@{#400905}
  • Loading branch information
nya3jp authored and Commit bot committed Jun 21, 2016
1 parent de70f5c commit e05337a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/chromeos/arc/arc_wallpaper_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void ArcWallpaperHandler::SetWallpaper(const std::vector<uint8_t>& jpeg_data) {
std::unique_ptr<ImageRequestImpl> request =
base::MakeUnique<ImageRequestImpl>(this);
// TODO(nya): Improve ImageDecoder to minimize copy.
std::string jpeg_data_as_string(reinterpret_cast<const char*>(jpeg_data[0]),
jpeg_data.size());
std::string jpeg_data_as_string(
reinterpret_cast<const char*>(jpeg_data.data()), jpeg_data.size());
ImageDecoder::StartWithOptions(request.get(), jpeg_data_as_string,
ImageDecoder::ROBUST_JPEG_CODEC, true);
inflight_requests_.insert(request.release());
Expand Down

0 comments on commit e05337a

Please sign in to comment.