[canvas] Don't copy into byte array of size 0
When StaticBitmapImage::SizeInBytes returned 0, StaticBitmapImage::CopyToByteArray did not result in a no-op as expected. With this CL we add a check to StaticBitmapImage::CopyToByteArray to return early if the incoming byte array has size 0. R=jbroman@chromium.org Bug: chromium:1017918 Change-Id: I79952218a483735815144000185a94f313a8e968 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883627 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by:Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#709921}
Showing
Please register or sign in to comment