diff options
Diffstat (limited to 'drivers/webp/enc/picture.c')
-rw-r--r-- | drivers/webp/enc/picture.c | 2 |
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 |