summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-08-01 22:14:12 +0200
committerAlbert Astals Cid <aacid@kde.org>2011-08-01 22:14:12 +0200
commit378fc06c574b85b5c003ca842aa743f0ffe5587e (patch)
tree8166418e20db2219052033a80119722fca9bdb51
parent861a7bfb9431609e1e148240447f23c8e83b9d0f (diff)
Only assume the OC is not visible if it exists and is set to no
Similar to commit e2def20a45c1d8307fd62fabb9769121af975abf but in the other branch of the if, fixes bug 39637
-rw-r--r--poppler/OptionalContent.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index e505f379..c8b5c972 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -5,7 +5,7 @@
// Copyright 2007 Brad Hards <bradh@kde.org>
// Copyright 2008 Pino Toscano <pino@kde.org>
// Copyright 2008, 2010 Carlos Garcia Campos <carlosgc@gnome.org>
-// Copyright 2008, 2010 Albert Astals Cid <aacid@kde.org>
+// Copyright 2008, 2010, 2011 Albert Astals Cid <aacid@kde.org>
// Copyright 2008 Mark Kaplan <mkaplan@finjan.com>
//
// Released under the GPL (version 2, or later, at your option)
@@ -213,7 +213,7 @@ bool OCGs::optContentIsVisible( Object *dictRef )
policy.free();
} else if ( dictType.isName("OCG") ) {
OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() );
- if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
+ if ( oc && oc->getState() == OptionalContentGroup::Off ) {
result=false;
}
}