From 668568bbffb7c5b710e6bfb98a21c9f5c414f0c4 Mon Sep 17 00:00:00 2001 From: Andreas Butti Date: Sat, 3 Nov 2018 09:17:33 +0100 Subject: [PATCH] Clear the vector in the destructor If there is a fault, and the destructor is called twice, we delete the bojects twice, and this gives really strange exceptions. --- src/pdf/popplerdirect/PdfExport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pdf/popplerdirect/PdfExport.cpp b/src/pdf/popplerdirect/PdfExport.cpp index 9103439d..6d710c7e 100644 --- a/src/pdf/popplerdirect/PdfExport.cpp +++ b/src/pdf/popplerdirect/PdfExport.cpp @@ -48,6 +48,7 @@ PdfExport::~PdfExport() { delete doc; } + documents.clear(); g_list_foreach(this->pageIds, (GFunc) g_free, NULL); g_list_free(this->pageIds);