]> git.sesse.net Git - kdenlive/blobdiff - src/documentvalidator.cpp
Fix possible crash in case effect "update" functction throws an exception.
[kdenlive] / src / documentvalidator.cpp
index 3722a0d929c822efec099ff51b03410c100ebd5b..85966ebffb8fef0540b4350ed02ccbb4cbe2a4bc 100644 (file)
@@ -1100,7 +1100,7 @@ void DocumentValidator::updateEffects()
 
                     QString effectString = updateRules.call(QScriptValue(), QScriptValueList()  << serviceVersion << effectVersion << scriptDoc.toString()).toString();
 
-                    if (!effectString.isEmpty()) {
+                    if (!effectString.isEmpty() && !scriptEngine.hasUncaughtException()) {
                         scriptDoc.setContent(effectString);
                         QDomNode updatedEffect = effect.ownerDocument().importNode(scriptDoc.documentElement(), true);
                         effect.parentNode().replaceChild(updatedEffect, effect);