From 15d4d1f2fc8b37d30694acc5765a822718af6c13 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 05 Dec 2002 19:13:57 +0000 Subject: - fixed a minor memory leak --- diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index ac52b07..2df7f27 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -795,17 +795,16 @@ void PlayListWidget::writeCurrentM3u() { m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); if( d->selectedFiles->first()) { - do { - // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); - m3uList->add( d->selectedFiles->current()->file() ); + do { + // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); + m3uList->add( d->selectedFiles->current()->file() ); + } + while ( d->selectedFiles->next() ); + // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); + m3uList->write(); + m3uList->close(); } - while ( d->selectedFiles->next() ); - // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); - m3uList->write(); - m3uList->close(); - delete m3uList; - } } -- cgit v0.9.0.2