summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent/ImageCodecPluginSerenity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/WebContent/ImageCodecPluginSerenity.cpp')
-rw-r--r--Userland/Services/WebContent/ImageCodecPluginSerenity.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/ImageCodecPluginSerenity.cpp b/Userland/Services/WebContent/ImageCodecPluginSerenity.cpp
index 426cf5fb27..3b04f5a2e1 100644
--- a/Userland/Services/WebContent/ImageCodecPluginSerenity.cpp
+++ b/Userland/Services/WebContent/ImageCodecPluginSerenity.cpp
@@ -31,6 +31,8 @@ Optional<Web::Platform::DecodedImage> ImageCodecPluginSerenity::decode_image(Rea
decoded_image.is_animated = result.is_animated;
decoded_image.loop_count = result.loop_count;
for (auto const& frame : result.frames) {
+ if (!frame.bitmap)
+ return {};
decoded_image.frames.empend(move(frame.bitmap), frame.duration);
}