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 = "";
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;