summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmark.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentmark.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmark.cpp b/core/fpdfapi/page/cpdf_contentmark.cpp
index 77c29a53d7..a4bb15ed9a 100644
--- a/core/fpdfapi/page/cpdf_contentmark.cpp
+++ b/core/fpdfapi/page/cpdf_contentmark.cpp
@@ -23,6 +23,9 @@ std::unique_ptr<CPDF_ContentMark> CPDF_ContentMark::Clone() {
}
size_t CPDF_ContentMark::CountItems() const {
+ if (!m_Ref)
+ return 0;
+
return m_Ref->CountItems();
}