Commit a1a1e0ad authored by Thomas Eschenbacher's avatar Thomas Eschenbacher

(fixed minor memory leak and some unreachable code)

parent 71d7c43d
......@@ -108,7 +108,7 @@ QStringList *Kwave::SaveBlocksPlugin::setup(QStringList &previous_params)
return 0;
}
QStringList *list = new QStringList();
QStringList *list = new(std::nothrow) QStringList();
Q_ASSERT(list);
if (list) {
// user has pressed "OK"
......@@ -117,6 +117,7 @@ QStringList *Kwave::SaveBlocksPlugin::setup(QStringList &previous_params)
QUrl url = dialog->selectedUrl();
if (url.isEmpty()) {
delete dialog;
delete list;
return 0;
}
QString name = url.path();
......@@ -148,10 +149,6 @@ QStringList *Kwave::SaveBlocksPlugin::setup(QStringList &previous_params)
QString::number(mode) + _(",") +
QString::number(selection_only) + _(")")
);
} else {
// user pressed "Cancel"
delete list;
list = 0;
}
if (dialog) delete dialog;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment