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