Slideshow infinite loop fix

If slideshow only had one item, it would loop trying to find a new slide
This commit is contained in:
Justin Swanson 2019-10-21 19:41:51 -05:00
parent f7b35198ec
commit d6c165f290

View File

@ -270,7 +270,7 @@ namespace Wabbajack
var idx = _random.Next(0, SlideShowElements.Count);
var element = SlideShowElements[idx];
if (checkLast)
if (checkLast && SlideShowElements.Count > 1)
{
while (element == _lastSlide && (!element.IsNSFW || (element.IsNSFW && ShowNSFW)))
{