Hi,
whenever a non-existent file is loaded in the tests (test-poppler-qt4 for
example), it segfaults. This simple patch solves the situation. I don't know
is there is any other case where it is useful...
Regards,
--
Rafael Rodríguez
http://unrincon.blogspot.com
http://cornerofcode.blogspot.com
diff -urN poppler/qt4/src/poppler-private.h poppler-mine/qt4/src/poppler-private.h
--- poppler/qt4/src/poppler-private.h 2006-05-23 21:49:16.000000000 +0100
+++ poppler-mine/qt4/src/poppler-private.h 2006-08-24 19:04:07.000000000 +0100
@@ -69,6 +69,8 @@
doc(filePath, ownerPassword, userPassword), m_splashOutputDev(0)
{
paperColor = Qt::white;
+ m_fontInfoScanner = NULL;
+ m_splashOutputDev = NULL;
// It might be more appropriate to delete these in PDFDoc
delete ownerPassword;
delete userPassword;
@@ -80,8 +82,10 @@
~DocumentData()
{
qDeleteAll(m_embeddedFiles);
- delete m_splashOutputDev;
- delete m_fontInfoScanner;
+ if (m_splashOutputDev)
+ delete m_splashOutputDev;
+ if (m_fontInfoScanner)
+ delete m_fontInfoScanner;
count --;
if ( count == 0 ) delete globalParams;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler