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

Fix crash by invalid scripts during stop phase

Example scenario: Script activated -> Syntax Error -> Manager tries to stop the
script -> Crash due to missing script engine

FIXED-IN: 2.4.2
BUG: 268917
parent 31570571
......@@ -18,6 +18,8 @@ VERSION 2.4.2-Beta 1
reduce the number of cache-related crashes.
BUGFIXES:
* Fixed crash for invalid scripts trying to be stopped by the manager.
(BR 268917)
* Fixed collection menu items ordering. (BR 207007)
* Fixed top level podcast location setting. (BR 263736)
* Fixed double-clicking in collection using left-handed mouse setting.
......
......@@ -287,8 +287,14 @@ void
ScriptManager::slotStopScript( const QString &name )
{
DEBUG_BLOCK
//FIXME: Sometimes a script can be evaluating and cannot be abort? or can be reevaluating for some reason?
ScriptItem *item = m_scripts.value( name );
if( !item->engine ) {
warning() << "Script has no script engine attached:" << name;
return;
}
//FIXME: Sometimes a script can be evaluating and cannot be abort? or can be reevaluating for some reason?
if( item->engine->isEvaluating() )
{
item->engine->abortEvaluation();
......
Supports Markdown
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