Page MenuHome

Fix T83869: Crash when creating Sequencer in new scene
ClosedPublic

Authored by Richard Antalik (ISS) on Dec 17 2020, 12:03 AM.

Details

Summary

Crash on null dereference in SEQ_timeline_boundbox(). This function was
generalized in rB9e4a4c2e996c to work on arbitrary seqbase.

Fixed by refactoring SEQ_timeline_boundbox() functions to return default
sane values if seqbase is NULL

Diff Detail

Repository
rB Blender

Event Timeline

Richard Antalik (ISS) requested review of this revision.Dec 17 2020, 12:03 AM

Though I don't have experience in this area, this change seems to make sense, it seems fine for SEQ_timeline_boundbox to be safe in the case of a NULL argument, especially if it's a fairly common situation to have an empty sequencer.

I think the naming for the new function could be improved though, unless there are other plans to adjust it in the future.

source/blender/sequencer/intern/sequencer.c
330

The naming here is a little confusing on first glance, "active_seqbase" sort of implies that the argument would have multiple seqbases and it will return the active one.

A name that might make more sense is SEQ_editing_seqbase_get, though I understand the naming in this whole area is changing a lot at the moment.

This revision is now accepted and ready to land.Dec 17 2020, 12:24 AM
Richard Antalik (ISS) marked an inline comment as done.Dec 17 2020, 12:33 AM
Richard Antalik (ISS) added inline comments.
source/blender/sequencer/intern/sequencer.c
330

Argument indeed can have multiple seqbases. Some are in meta strips. seqbasep is pointer to "active" - you can switch in/out meta by pressing tab in timeline.

Thanks for pointing this, I will add API docs, as I should for every new API function...

This revision was automatically updated to reflect the committed changes.
Richard Antalik (ISS) marked an inline comment as done.