Skip to content

Commit 14c4260

Browse files
authored
Merge pull request #5211 from OpenShot/protect-waveform-from-null-clip
Protect from generating a waveform for a NULL clip
2 parents 2c49311 + 150689f commit 14c4260

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/classes/waveform.py

+5
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ def getAudioData(file, channel=-1, tid=None):
141141
for clip_id in clip_list:
142142
clip = Clip.get(id=clip_id)
143143

144+
if not clip:
145+
# Ignore null clip
146+
log.debug(f"No clip found for ID: {clip_id}. Skipping waveform generation.")
147+
continue
148+
144149
# Check for channel mapping and filters
145150
channel_filter = int(clip.data.get("channel_filter", {}).get("Points", [])[0].get("co", {}).get("Y", -1))
146151
if channel_filter != -1:

0 commit comments

Comments
 (0)