Error handling for invalid component number in CPDF_ICCBasedCS::v_Load
[pdfium.git] / core / src / fpdftext / fpdf_text_int.cpp
index 6baf6ad..8736575 100644 (file)
@@ -1442,7 +1442,7 @@ FX_INT32 CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj)
         CPDF_ContentMarkItem& item = pMarkData->GetItem(n);
         CFX_ByteString tagStr = (CFX_ByteString)item.GetName();
         pDict = (CPDF_Dictionary*)item.GetParam();
-        CPDF_String* temp = (CPDF_String*)pDict->GetElement(FX_BSTRC("ActualText"));
+        CPDF_String* temp = (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) : NULL);
         if (temp) {
             bExist = TRUE;
             actText = temp->GetUnicodeText();