From 33a1e3e8fbe69f50fcd722ec9dfbf842a05fa4a3 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 3 May 2016 01:37:15 +0200 Subject: [PATCH] exception avoidance --- NadekoBot/Modules/Administration/Commands/PlayingRotate.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Modules/Administration/Commands/PlayingRotate.cs b/NadekoBot/Modules/Administration/Commands/PlayingRotate.cs index 90ca7c20..20071ca2 100644 --- a/NadekoBot/Modules/Administration/Commands/PlayingRotate.cs +++ b/NadekoBot/Modules/Administration/Commands/PlayingRotate.cs @@ -49,9 +49,10 @@ namespace NadekoBot.Modules.Administration.Commands var status = ""; lock (playingPlaceholderLock) { - if (PlayingPlaceholders.Count == 0) - return; - if (i >= PlayingPlaceholders.Count) + if (PlayingPlaceholders.Count == 0 + || NadekoBot.Config.RotatingStatuses.Count == 0 + || i >= PlayingPlaceholders.Count + || i >= NadekoBot.Config.RotatingStatuses.Count) { i = -1; return;