summaryrefslogtreecommitdiff
path: root/drivers/webp/enc/picture.c
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-07-14 09:03:14 +0200
committerGitHub <noreply@github.com>2016-07-14 09:03:14 +0200
commit1f2110956b8f66fc3c6c89f74f0dfeb6c2265e45 (patch)
tree6232703f2e5ddeb2ff9bb6fda050f673aec6a402 /drivers/webp/enc/picture.c
parent26baaf447abb85c7a1670141ffa6a41f3287601e (diff)
parente55c6f823251fcff366c7ce93b3ab0bf1fdedd68 (diff)
Merge pull request #5592 from volzhs/libwebp-0.5.1
Update webp driver to 0.5.1
Diffstat (limited to 'drivers/webp/enc/picture.c')
-rw-r--r--drivers/webp/enc/picture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/webp/enc/picture.c b/drivers/webp/enc/picture.c
index 26679a72e4..d9befbc47d 100644
--- a/drivers/webp/enc/picture.c
+++ b/drivers/webp/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