Commit 378fc06c authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Only assume the OC is not visible if it exists and is set to no

Similar to commit e2def20a
but in the other branch of the if, fixes bug 39637
parent 861a7bfb
......@@ -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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment