Fix (unreported): Crash on accessing active sequence in select groupped operator
This patch moves the NULL check of `actseq` to the correct position, which should happen before the `channel` is assigned. Otherwise an attempt to call the `sequencer_select_grouped_exec`, when there is no active sequence and `use_active_channel` set to true, results in a crash. Reviewed By: ISS Differential Revision: https://developer.blender.org/D7170
This commit is contained in:
parent
271231f58e
commit
f70241deba
|
@ -1419,17 +1419,17 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op)
|
|||
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
||||
Sequence *seq, *actseq = BKE_sequencer_active_get(scene);
|
||||
|
||||
if (actseq == NULL) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active sequence!");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
const int type = RNA_enum_get(op->ptr, "type");
|
||||
const int channel = RNA_boolean_get(op->ptr, "use_active_channel") ? actseq->machine : 0;
|
||||
const bool extend = RNA_boolean_get(op->ptr, "extend");
|
||||
|
||||
bool changed = false;
|
||||
|
||||
if (actseq == NULL) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active sequence!");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (!extend) {
|
||||
SEQP_BEGIN (ed, seq) {
|
||||
seq->flag &= ~SELECT;
|
||||
|
|
Loading…
Reference in New Issue