summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index 0584e7be48..2a59123344 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -37,8 +37,7 @@ std::ostream& operator<<(std::ostream& ar, const CFX_Matrix& matrix) {
bool GetColor(const CPDF_Color* pColor, float* rgb) {
int intRGB[3];
- if (!pColor ||
- pColor->GetColorSpace() != CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB) ||
+ if (!pColor || !pColor->IsColorSpaceRGB() ||
!pColor->GetRGB(&intRGB[0], &intRGB[1], &intRGB[2])) {
return false;
}