Skip to content

Timeline::set_tracks(nullptr) leads to bad state #851

@davidbaraff

Description

@davidbaraff

Bug Report

Passing null to Timeline::set_tracks() leads the C++ state in a bad way: there's an implicit assumption that _tracks is always a valid pointer. If null is passed, we should create it like the constructor and just create a new empty stack, exactly as the constructor does.

To Reproduce

In Python:
import opentimelineio as otio
t = otio.schema.Timeline()
t.tracks = None
t.audio_tracks() # crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem, flaw, or broken functionality.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions