Commit db957849 authored by Kevin Funk's avatar Kevin Funk
Browse files

externalscript: Fix crash in case of no active document

BUG: 339010
parent 03a3ce34
......@@ -252,7 +252,8 @@ void ExternalScriptPlugin::execute( ExternalScriptItem* item, const KUrl& url )
void ExternalScriptPlugin::execute(ExternalScriptItem* item) const
{
execute( item, KDevelop::ICore::self()->documentController()->activeDocument()->url() );
auto document = KDevelop::ICore::self()->documentController()->activeDocument();
execute( item, document ? document->url() : KUrl() );
}
bool ExternalScriptPlugin::executeCommand ( QString command, QString workingDirectory ) const
......
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