Index: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
index 6d071f3ae065eb80252786227b3657af13c8c775..62a3c679961083ae80a42d70600753c4715710ca 100644 |
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
@@ -510,11 +510,8 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, |
continue; |
} |
case FXBSTR_ID('T', 'R', '2', 0): |
- if (pObject && pObject->GetType() != PDFOBJ_NAME) { |
- pGeneralState->m_pTR = pObject; |
- } else { |
- pGeneralState->m_pTR = NULL; |
- } |
+ pGeneralState->m_pTR = |
+ (pObject && !pObject->IsName()) ? pObject : nullptr; |
break; |
case FXBSTR_ID('B', 'M', 0, 0): { |
CFX_ByteString mode; |