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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user