You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Ignore NULL nodes in JSON arrays (clips, effects). This can happen sometimes (for an unknown reason), and it currently crashes OpenShot when attempting to Export a video.
This commit is contained in:
@@ -1040,6 +1040,11 @@ void Clip::SetJsonValue(const Json::Value root) {
|
||||
|
||||
// loop through effects
|
||||
for (const auto existing_effect : root["effects"]) {
|
||||
// Skip NULL nodes
|
||||
if (existing_effect.isNull()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Effect
|
||||
EffectBase *e = NULL;
|
||||
if (!existing_effect["type"].isNull()) {
|
||||
|
||||
@@ -1193,6 +1193,11 @@ void Timeline::SetJsonValue(const Json::Value root) {
|
||||
|
||||
// loop through clips
|
||||
for (const Json::Value existing_clip : root["clips"]) {
|
||||
// Skip NULL nodes
|
||||
if (existing_clip.isNull()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Clip
|
||||
Clip *c = new Clip();
|
||||
|
||||
@@ -1220,6 +1225,11 @@ void Timeline::SetJsonValue(const Json::Value root) {
|
||||
|
||||
// loop through effects
|
||||
for (const Json::Value existing_effect :root["effects"]) {
|
||||
// Skip NULL nodes
|
||||
if (existing_effect.isNull()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Effect
|
||||
EffectBase *e = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user