summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 2dfccb26d7..6cd66185c6 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -326,7 +326,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
return nullptr;
if (pCSObj->IsName()) {
- CFX_ByteString name = pCSObj->GetConstString();
+ CFX_ByteString name = pCSObj->GetString();
CPDF_ColorSpace* pCS = CPDF_ColorSpace::ColorspaceFromName(name);
if (!pCS && pResources) {
CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index ba2901df24..654c9350a9 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -736,9 +736,10 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
return;
}
- CFX_ByteStringC type = pXObject->GetDict()
- ? pXObject->GetDict()->GetConstStringBy("Subtype")
- : CFX_ByteStringC();
+ CFX_ByteString type;
+ if (pXObject->GetDict())
+ type = pXObject->GetDict()->GetStringBy("Subtype");
+
if (type == "Image") {
if (m_Options.m_bTextOnly) {
return;