Skip to content

Commit 32556d5

Browse files
committed
Protect calls to ParentClipProperties
1 parent b6c07d3 commit 32556d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Clip.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ std::string Clip::PropertiesJSON(int64_t requested_frame) const {
792792
root["waveform"]["choices"].append(add_property_choice_json("No", false, waveform));
793793

794794
// Add the parentTrackedObject's properties
795-
if (parentTrackedObject)
795+
if (parentTrackedObject && parentClipObject)
796796
{
797797
// Convert Clip's frame position to Timeline's frame position
798798
long clip_start_position = round(Position() * info.fps.ToDouble()) + 1;
@@ -1445,7 +1445,10 @@ QTransform Clip::get_transform(std::shared_ptr<Frame> frame, int width, int heig
14451445
double timeline_frame_number = frame->number + clip_start_position - clip_start_frame;
14461446

14471447
// Get parentTrackedObject's parent clip's properties
1448-
std::map<std::string, float> trackedObjectParentClipProperties = parentTrackedObject->GetParentClipProperties(timeline_frame_number);
1448+
std::map<std::string, float> trackedObjectParentClipProperties;
1449+
if (parentClipObject) {
1450+
parentTrackedObject->GetParentClipProperties(timeline_frame_number);
1451+
}
14491452

14501453
// Get the attached object's parent clip's properties
14511454
if (!trackedObjectParentClipProperties.empty())

0 commit comments

Comments
 (0)