mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
fix(gioui): prevent crashing when loading malformed song
This commit is contained in:
parent
485b783341
commit
ac95fb65c4
@ -55,6 +55,9 @@ func (t *Tracker) loadSong() {
|
||||
return
|
||||
}
|
||||
}
|
||||
if song.Score.Length <= 0 || len(song.Score.Tracks) == 0 || len(song.Patch) == 0 {
|
||||
return
|
||||
}
|
||||
t.SetSong(song)
|
||||
t.SetFilePath(filename)
|
||||
t.window.Option(app.Title(fmt.Sprintf("Sointu Tracker - %v", filename)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user