Bugfix: Fixed NullReferenceException when search returned 0 results

This commit is contained in:
Stephan Sundermann authored and Florian Küpper committed 2013-12-26 13:07:25 +01:00
1 parent f2b30d0952
commit f5d3358b5f
1 file changed
+3
@@ -197,6 +197,8 @@ namespace VocaluxeLib.Menu.SongMenu
} }
private void UpdateLength(CSong song) private void UpdateLength(CSong song)
{
if (song != null)
{ {
float time = CBase.Sound.GetLength(_PreviewSongStream); float time = CBase.Sound.GetLength(_PreviewSongStream);
if (Math.Abs(song.Finish) > 0.001) if (Math.Abs(song.Finish) > 0.001)
@@ -212,6 +214,7 @@ namespace VocaluxeLib.Menu.SongMenu
_Length = time; _Length = time;
} }
} }
}
public override void OnShow() public override void OnShow()
{ {