r15188 by jghali - #9171 : fix potential crash on exit after using image export plugin
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 15 21:00:23 CEST 2010
Revision: 15188
Author: jghali
Date: 2010-06-15T18:52:07.538960Z
Commit message: #9171 : fix potential crash on exit after using image export plugin
Changeset:
M /branches/Version135/Scribus/scribus/plugins/pixmapexport/export.cpp
Diffs:
Index: scribus/plugins/pixmapexport/export.cpp
===================================================================
--- scribus/plugins/pixmapexport/export.cpp (revision 15187)
+++ scribus/plugins/pixmapexport/export.cpp (revision 15188)
@@ -10,6 +10,7 @@
#include <QString>
#include <QDir>
#include <QCursor>
+#include <QSharedPointer>
#include "scmessagebox.h"
#include "scribus.h"
@@ -94,8 +95,8 @@
{
Q_ASSERT(target.isEmpty());
Q_ASSERT(!doc->masterPageMode());
- ExportBitmap *ex = new ExportBitmap();
- ExportForm *dia = new ExportForm(doc->scMW(), doc, ex->pageDPI, ex->quality, ex->bitmapType);
+ QSharedPointer<ExportBitmap> ex( new ExportBitmap() );
+ QSharedPointer<ExportForm> dia( new ExportForm(doc->scMW(), doc, ex->pageDPI, ex->quality, ex->bitmapType) );
// interval widgets handling
QString tmp;
@@ -144,9 +145,6 @@
if (res)
doc->scMW()->setStatusBarInfoText( tr("Export successful"));
}
- // clean the trash
- delete ex;
- delete dia;
return true;
}
More information about the scribus-commit
mailing list