Fix crash drawing in the sequencer when Scene::ed is null
Regression in [0], also order checks so creating a map of sequencer
strips is done after the flag check.
[0]: 86a0d0015a
This commit is contained in:
parent
2456897d9d
commit
ee4c45c612
|
@ -48,8 +48,12 @@ using blender::MutableSpan;
|
|||
|
||||
bool sequencer_retiming_mode_is_active(const bContext *C)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
return SEQ_retiming_selection_get(SEQ_editing_get(scene)).size() > 0;
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
Editing *ed = SEQ_editing_get(scene);
|
||||
if (ed == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return SEQ_retiming_selection_get(ed).size() > 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------- */
|
||||
|
|
|
@ -397,8 +397,8 @@ static void retime_keys_draw(const bContext *C)
|
|||
{
|
||||
const SpaceSeq *sseq = CTX_wm_space_seq(C);
|
||||
|
||||
if (!sequencer_retiming_mode_is_active(C) &&
|
||||
(sseq->timeline_overlay.flag & SEQ_TIMELINE_SHOW_STRIP_RETIMING) == 0)
|
||||
if ((sseq->timeline_overlay.flag & SEQ_TIMELINE_SHOW_STRIP_RETIMING) == 0 &&
|
||||
!sequencer_retiming_mode_is_active(C))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -510,8 +510,8 @@ static void retime_speed_text_draw(const bContext *C,
|
|||
static void retime_speed_draw(const bContext *C)
|
||||
{
|
||||
const SpaceSeq *sseq = CTX_wm_space_seq(C);
|
||||
if (!sequencer_retiming_mode_is_active(C) &&
|
||||
(sseq->timeline_overlay.flag & SEQ_TIMELINE_SHOW_STRIP_RETIMING) == 0)
|
||||
if ((sseq->timeline_overlay.flag & SEQ_TIMELINE_SHOW_STRIP_RETIMING) == 0 &&
|
||||
!sequencer_retiming_mode_is_active(C))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue