summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_colorstate.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_colorstate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp b/core/fpdfapi/fpdf_page/cpdf_colorstate.cpp
index 88e9f561c3..1d422cb061 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;