Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(970)

Unified Diff: third_party/libwebp/enc/picture.c

Issue 2149863002: libwebp: update to v0.5.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/enc/near_lossless.c ('k') | third_party/libwebp/enc/picture_csp.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/enc/picture.c
diff --git a/third_party/libwebp/enc/picture.c b/third_party/libwebp/enc/picture.c
index 26679a72e41452eb67fd86b28ff61c57a5dad17c..d9befbc47d93fa0dcd1a1c5ac73c4a748f1df747 100644
--- a/third_party/libwebp/enc/picture.c
+++ b/third_party/libwebp/enc/picture.c
@@ -237,6 +237,8 @@ static size_t Encode(const uint8_t* rgba, int width, int height, int stride,
WebPMemoryWriter wrt;
int ok;
+ if (output == NULL) return 0;
+
if (!WebPConfigPreset(&config, WEBP_PRESET_DEFAULT, quality_factor) ||
!WebPPictureInit(&pic)) {
return 0; // shouldn't happen, except if system installation is broken
« no previous file with comments | « third_party/libwebp/enc/near_lossless.c ('k') | third_party/libwebp/enc/picture_csp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698