Index: core/fpdfapi/fpdf_page/cpdf_colorstate.cpp |
diff --git a/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp b/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp |
index 88e9f561c32f7b2734d0bcb6b1a6be824172e764..1d422cb061a60228bfa669763e5c0602fb68c81a 100644 |
--- a/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp |
+++ b/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp |
@@ -34,9 +34,9 @@ void CPDF_ColorState::SetColor(CPDF_Color& color, |
} else if (color.IsNull()) { |
color.SetColorSpace(CPDF_ColorSpace::GetStockCS(PDFCS_DEVICEGRAY)); |
} |
- if (color.m_pCS->CountComponents() > nValues) { |
+ if (color.GetColorSpace()->CountComponents() > nValues) |
return; |
- } |
+ |
color.SetValue(pValue); |
int R, G, B; |
rgb = color.GetRGB(R, G, B) ? FXSYS_RGB(R, G, B) : (uint32_t)-1; |