From 7097e7ab2174df684754192f96a2319ad1f67235 Mon Sep 17 00:00:00 2001 From: kiirala Date: Wed, 9 Jan 2008 22:58:38 +0000 Subject: [PATCH] Another take to fixing pdf import crash, likely without memory leak --- src/extension/internal/pdfinput/pdf-input.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 31364f61e..fbb94ca8c 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -583,7 +583,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { #ifndef WIN32 GooString *filename_goo = new GooString(uri); PDFDoc *pdf_doc = new PDFDoc(filename_goo, NULL, NULL, NULL); // TODO: Could ask for password - delete filename_goo; + //delete filename_goo; #else wchar_t *wfilename = (wchar_t*)g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL); @@ -627,7 +627,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { PdfImportDialog *dlg = new PdfImportDialog(pdf_doc, uri); if (!dlg->showDialog()) { delete dlg; - //delete pdf_doc; + delete pdf_doc; return NULL; } @@ -708,7 +708,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { delete pdf_parser; delete builder; g_free(docname); - //delete pdf_doc; + delete pdf_doc; // Restore undo sp_document_set_undo_sensitive(doc, saved); -- 2.30.2