Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore NULL nodes in JSON arrays (clips, effects). #942

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
10 changes: 10 additions & 0 deletions src/Timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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;

Expand Down