Skip to content

Commit 150689f

Browse files
committed
Protect from generating a waveform for a NULL clip (we should skip clips that we can't find or query). Reported in Sentry: OPENSHOT-1WJ5
1 parent 266092e commit 150689f

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)