From 4d72d43c0a6f64d556011757cf81fe18018a75b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sat, 21 Dec 2013 23:46:01 +0100 Subject: [PATCH] Fixes #87 - Crash without songs. --- Vocaluxe/Base/CSongs.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vocaluxe/Base/CSongs.cs b/Vocaluxe/Base/CSongs.cs index 86a2f482..9477224e 100644 --- a/Vocaluxe/Base/CSongs.cs +++ b/Vocaluxe/Base/CSongs.cs @@ -217,6 +217,9 @@ namespace Vocaluxe.Base public static void UpdateRandomSongList() { _SongsForRandom.Clear(); + if (NumSongsVisible == 0) + return; + //Calc avarage sing-count int totalCounts = 0; foreach (CSong song in VisibleSongs)