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 @@

// loop through effects
for (const auto existing_effect : root["effects"]) {
// Skip NULL nodes
if (existing_effect.isNull()) {
continue;

Check warning on line 1045 in src/Clip.cpp

View check run for this annotation

Codecov / codecov/patch

src/Clip.cpp#L1044-L1045

Added lines #L1044 - L1045 were not covered by tests
}

// 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 @@

// loop through clips
for (const Json::Value existing_clip : root["clips"]) {
// Skip NULL nodes
if (existing_clip.isNull()) {
continue;

Check warning on line 1198 in src/Timeline.cpp

View check run for this annotation

Codecov / codecov/patch

src/Timeline.cpp#L1198

Added line #L1198 was not covered by tests
}

// Create Clip
Clip *c = new Clip();

Expand Down Expand Up @@ -1220,6 +1225,11 @@

// loop through effects
for (const Json::Value existing_effect :root["effects"]) {
// Skip NULL nodes
if (existing_effect.isNull()) {
continue;

Check warning on line 1230 in src/Timeline.cpp

View check run for this annotation

Codecov / codecov/patch

src/Timeline.cpp#L1230

Added line #L1230 was not covered by tests
}

// Create Effect
EffectBase *e = NULL;

Expand Down
Loading