summaryrefslogtreecommitdiff
path: root/poppler/Link.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/Link.cc')
-rw-r--r--poppler/Link.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/poppler/Link.cc b/poppler/Link.cc
index 74b16d7f..f9d4edf9 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -872,13 +872,14 @@ LinkOCGState::LinkOCGState(const Object *obj)
//------------------------------------------------------------------------
LinkHide::LinkHide(const Object *hideObj) {
- targetName = nullptr;
+ hasTargetNameFlag = false;
show = false; // Default
if (hideObj->isDict()) {
const Object targetObj = hideObj->dictLookup("T");
if (targetObj.isString()) {
- targetName = targetObj.getString()->copy();
+ targetName = targetObj.getString()->toStr();
+ hasTargetNameFlag = true;
}
const Object shouldHide = hideObj->dictLookup("H");
if (shouldHide.isBool()) {
@@ -887,10 +888,6 @@ LinkHide::LinkHide(const Object *hideObj) {
}
}
-LinkHide::~LinkHide() {
- delete targetName;
-}
-
//------------------------------------------------------------------------
// LinkUnknown
//------------------------------------------------------------------------