Fix crash when starting a song without notes.

This commit is contained in:
Florian Kuepper committed 2012-12-01 20:46:07 +01:00
1 parent 9e355268e0
commit 0ed0a168ed
2 files changed
+8 -1

No files matched your search

+5
View File
@@ -46,6 +46,11 @@ namespace Vocaluxe.Lib.Song
get { return _CoverLoaded; }
}
public bool NotesLoaded
{
get { return _NotesLoaded; }
}
public bool CoverBigLoaded = false;
public bool BackgroundLoaded = false;
+3 -1
View File
@@ -937,9 +937,11 @@ namespace Vocaluxe.Screens
float dt = 4f;
float rt = dt * 0.8f;
CSong Song = CGame.GetSong();
CSong Song = CGame.GetSong();
if (Song == null)
return null;
else if (!Song.NotesLoaded)
return null;
float[] Alpha = new float[Song.Notes.Lines.Length * 2];
CLines[] lines = new CLines[Song.Notes.Lines.Length];