[poppler] poppler/OptionalContent.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Aug 1 13:16:45 PDT 2011


 poppler/OptionalContent.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 378fc06c574b85b5c003ca842aa743f0ffe5587e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Aug 1 22:14:12 2011 +0200

    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

diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index e505f37..c8b5c97 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -5,7 +5,7 @@
 // Copyright 2007 Brad Hards <bradh at kde.org>
 // Copyright 2008 Pino Toscano <pino at kde.org>
 // Copyright 2008, 2010 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright 2008, 2010 Albert Astals Cid <aacid at kde.org>
+// Copyright 2008, 2010, 2011 Albert Astals Cid <aacid at kde.org>
 // Copyright 2008 Mark Kaplan <mkaplan at 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;
     }
   }


More information about the poppler mailing list