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
+7

No files matched your search

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