Commit 998b1523 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos Committed by Albert Astals Cid
Browse files

Some free

parent c65a66a8
...@@ -46,6 +46,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) : ...@@ -46,6 +46,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) :
Object ocg; Object ocg;
ocgList.arrayGet(i, &ocg); ocgList.arrayGet(i, &ocg);
if (!ocg.isDict()) { if (!ocg.isDict()) {
ocg.free();
break; break;
} }
OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict(), xref); OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict(), xref);
...@@ -82,6 +83,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) : ...@@ -82,6 +83,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) :
on.arrayGetNF(i, &reference); on.arrayGetNF(i, &reference);
if (!reference.isRef()) { if (!reference.isRef()) {
// there can be null entries // there can be null entries
reference.free();
break; break;
} }
OptionalContentGroup *group = findOcgByRef( reference.getRef() ); OptionalContentGroup *group = findOcgByRef( reference.getRef() );
...@@ -104,6 +106,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) : ...@@ -104,6 +106,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) :
off.arrayGetNF(i, &reference); off.arrayGetNF(i, &reference);
if (!reference.isRef()) { if (!reference.isRef()) {
// there can be null entries // there can be null entries
reference.free();
break; break;
} }
OptionalContentGroup *group = findOcgByRef( reference.getRef() ); OptionalContentGroup *group = findOcgByRef( reference.getRef() );
......
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