Skip to content

Commit

Permalink
Double check if array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Apr 18, 2019
1 parent a0a082f commit b417677
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tomomibot/voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def find_wav(self, point_classes,
indices = point_classes[class_sound]
possible_wavs = self.wavs[indices]

if len(possible_wavs) == 0:
return None

if self.version == 2:
# Filter by dynamic class
if class_dynamic:
Expand Down

0 comments on commit b417677

Please sign in to comment.