Fix T99110: Crash after running view_all operator in VSE
Crash caused by NULL dereference, when `Editing` is not initialized. Check if data is initialized in poll function.
This commit is contained in:
parent
d1ea39aac7
commit
5c6ffd07e0
Notes:
blender-bot
2023-02-14 05:04:52 +01:00
Referenced by issue #99110, Blender crashes when pressing 'Numpad .' in Sequencer Referenced by issue #98661, 3.2: Potential candidates for corrective releases
|
@ -173,6 +173,11 @@ bool sequencer_edit_poll(bContext *C)
|
|||
return (SEQ_editing_get(CTX_data_scene(C)) != NULL);
|
||||
}
|
||||
|
||||
bool sequencer_editing_initialized_and_active(bContext *C)
|
||||
{
|
||||
return ED_operator_sequencer_active(C) && sequencer_edit_poll(C);
|
||||
}
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
bool sequencer_strip_poll(bContext *C)
|
||||
{
|
||||
|
|
|
@ -133,6 +133,7 @@ int seq_effect_find_selected(struct Scene *scene,
|
|||
|
||||
/* Operator helpers. */
|
||||
bool sequencer_edit_poll(struct bContext *C);
|
||||
bool sequencer_editing_initialized_and_active(struct bContext *C);
|
||||
/* UNUSED */
|
||||
/* bool sequencer_strip_poll(struct bContext *C); */
|
||||
bool sequencer_strip_has_path_poll(struct bContext *C);
|
||||
|
|
|
@ -373,7 +373,7 @@ void SEQUENCER_OT_view_selected(wmOperatorType *ot)
|
|||
|
||||
/* Api callbacks. */
|
||||
ot->exec = sequencer_view_selected_exec;
|
||||
ot->poll = ED_operator_sequencer_active;
|
||||
ot->poll = sequencer_editing_initialized_and_active;
|
||||
|
||||
/* Flags. */
|
||||
ot->flag = OPTYPE_REGISTER;
|
||||
|
|
Loading…
Reference in New Issue