diff options
author | Albert Astals Cid <aacid@kde.org> | 2024-04-10 01:28:46 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2024-04-20 13:07:41 +0200 |
commit | 2ce8812b658e5710ad907bb5d372c64bd61b6d57 (patch) | |
tree | 64bc42ff370538389ec1e0e0ffcd27c7b23ee0b6 | |
parent | 941666ce0c8e20087d6c006f7bc09ecd0ec84e8f (diff) |
cpp: Fix crash extracting text and font in some files
Issue reported and patch suggestion by Samad Koita and Aviral Agarwal
Fixes issue #1477
-rw-r--r-- | poppler/TextOutputDev.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 8ba60451..3a7094ce 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -394,7 +394,7 @@ bool TextFontInfo::matches(const TextFontInfo *fontInfo) const bool TextFontInfo::matches(const Ref *ref) const { - return (*(gfxFont->getID()) == *ref); + return gfxFont && (*(gfxFont->getID()) == *ref); } double TextFontInfo::getAscent() const |