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 c7f04f52e1
commit 5dce9a1e78

View File

@ -261,7 +261,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)))
{