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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp

Issue 2106223002: Ensure that input to qcms_profile_precache_output_transform is non-null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
index 9f84122508d48414380954d9cb2a0fe8bd15a8b8..b3bd7d93278ee227f858d7c18dbbf28eacff334c 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
@@ -317,8 +317,10 @@ void ImageDecoder::setTargetColorProfile(const WebVector<char>& profile)
// FIXME: Add optional ICCv4 support and support for multiple monitors.
gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size());
+ if (!gTargetColorProfile)
+ return;
- if (gTargetColorProfile && qcms_profile_is_bogus(gTargetColorProfile)) {
+ if (qcms_profile_is_bogus(gTargetColorProfile)) {
qcms_profile_release(gTargetColorProfile);
gTargetColorProfile = nullptr;
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698