exception avoidance

This commit is contained in:
Master Kwoth 2016-05-03 01:37:15 +02:00
parent 6aa15c89ae
commit 33a1e3e8fb

View File

@ -49,9 +49,10 @@ namespace NadekoBot.Modules.Administration.Commands
var status = ""; var status = "";
lock (playingPlaceholderLock) lock (playingPlaceholderLock)
{ {
if (PlayingPlaceholders.Count == 0) if (PlayingPlaceholders.Count == 0
return; || NadekoBot.Config.RotatingStatuses.Count == 0
if (i >= PlayingPlaceholders.Count) || i >= PlayingPlaceholders.Count
|| i >= NadekoBot.Config.RotatingStatuses.Count)
{ {
i = -1; i = -1;
return; return;