Fix T90967: Snapping not working with single strip

Even if `snap_targets` `SeqCollection` is empty, there can be static
snap points defined, so don't condition snapping on non-zero target
count.

Differential Revision: https://developer.blender.org/D12400
This commit is contained in:
Richard Antalik 2021-09-07 23:39:50 +02:00
parent adbafe3b43
commit 4abbf6d82b
Notes: blender-bot 2023-02-14 04:31:04 +01:00
Referenced by issue #90967, VSE: Snap to current frame not working
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ TransSeqSnapData *transform_snap_sequencer_data_alloc(const TransInfo *t)
SeqCollection *snap_sources = SEQ_query_selected_strips(seqbase);
SeqCollection *snap_targets = query_snap_targets(t, snap_sources);
if (SEQ_collection_len(snap_sources) == 0 || SEQ_collection_len(snap_targets) == 0) {
if (SEQ_collection_len(snap_sources) == 0) {
SEQ_collection_free(snap_targets);
SEQ_collection_free(snap_sources);
MEM_freeN(snap_data);