mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-13 12:31:52 +02:00
* Don't create a playlist when parsing invalid XSPF data.
This commit is contained in:
parent
ea08f1578c
commit
e4f9e936ed
@ -1,7 +1,8 @@
|
||||
#include <QDomDocument>
|
||||
|
||||
#include "xspfloader.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "tomahawk/tomahawkapp.h"
|
||||
#include "tomahawk/playlist.h"
|
||||
|
||||
@ -80,6 +81,13 @@ XSPFLoader::gotBody()
|
||||
info = docElement.firstChildElement( "creator" ).text();
|
||||
creator = docElement.firstChildElement( "info" ).text();
|
||||
|
||||
if ( title.isEmpty() )
|
||||
{
|
||||
QMessageBox::critical( APP->mainWindow(), tr( "XSPF Error" ), tr( "This is not a valid XSPF playlist." ) );
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
m_playlist = Playlist::create( APP->sourcelist().getLocal(),
|
||||
uuid(),
|
||||
title,
|
||||
|
Loading…
x
Reference in New Issue
Block a user