Don't try to free unallocated things when releasing the PdfDocument object.
[GB.POPPLER] * BUG: Don't try to free unallocated things when releasing the PdfDocument object.
This commit is contained in:
parent
ca6ce92d1e
commit
5181dc1427
1 changed files with 22 additions and 19 deletions
|
@ -133,6 +133,8 @@ BEGIN_METHOD_VOID(PdfDocument_free)
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (THIS->doc)
|
||||||
|
{
|
||||||
if (THIS->pages)
|
if (THIS->pages)
|
||||||
{
|
{
|
||||||
for (i = 0; i < poppler_document_get_n_pages(THIS->doc); i++)
|
for (i = 0; i < poppler_document_get_n_pages(THIS->doc); i++)
|
||||||
|
@ -155,6 +157,7 @@ BEGIN_METHOD_VOID(PdfDocument_free)
|
||||||
delete THIS->renderer;
|
delete THIS->renderer;
|
||||||
delete THIS->rdoc;
|
delete THIS->rdoc;
|
||||||
g_object_unref(THIS->doc);
|
g_object_unref(THIS->doc);
|
||||||
|
}
|
||||||
|
|
||||||
GB.ReleaseFile(THIS->buffer, THIS->length);
|
GB.ReleaseFile(THIS->buffer, THIS->length);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue