1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02:00

Don't crash when getting an invalid dbcmd.

This commit is contained in:
Teo Mrnjavac
2013-10-23 16:29:00 +02:00
parent dda1ad8c77
commit 9476a06f3d

View File

@@ -341,6 +341,9 @@ Database::createCommandInstance(const QVariant& op, const source_ptr& source)
const QString commandName = op.toMap().value( "command" ).toString();
dbcmd_ptr command = createCommandInstance( commandName );
if ( command.isNull() )
return command;
command->setSource( source );
QJson::QObjectHelper::qvariant2qobject( op.toMap(), command.data() );
return command;