Index: ui/gfx/color_transform.cc |
diff --git a/ui/gfx/color_transform.cc b/ui/gfx/color_transform.cc |
index 49a3026c895e13c33926b613c6724dc4e45d723c..e427ad709526b11b6855c0c583667b62dabd9ac1 100644 |
--- a/ui/gfx/color_transform.cc |
+++ b/ui/gfx/color_transform.cc |
@@ -686,6 +686,11 @@ ScopedQcmsProfile GetXYZD50Profile() { |
ColorTransformInternal::ColorTransformInternal(const ColorSpace& from, |
const ColorSpace& to, |
Intent intent) { |
+ // If no source color space is specified, do no transformation. |
+ // TODO(ccameron): We may want to assume sRGB at some point in the future. |
+ if (!from.IsValid()) |
+ return; |
+ |
ScopedQcmsProfile from_profile = GetQCMSProfileIfAvailable(from); |
ScopedQcmsProfile to_profile = GetQCMSProfileIfAvailable(to); |
bool has_from_profile = !!from_profile; |