mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed endless while loop
This commit is contained in:
parent
6fa03cbc5d
commit
775354b4d9
@ -81,15 +81,15 @@ namespace Wabbajack.UI
|
||||
{
|
||||
var idx = _random.Next(0, SlideShowElements.Count);
|
||||
var randomSlide = SlideShowElements[idx];
|
||||
while (CachedSlides.ContainsKey(randomSlide.ModID) || SlidesQueue.Contains(randomSlide))
|
||||
while (!CachedSlides.ContainsKey(randomSlide.ModID) || SlidesQueue.Contains(randomSlide))
|
||||
{
|
||||
idx = _random.Next(0, SlideShowElements.Count);
|
||||
randomSlide = SlideShowElements[idx];
|
||||
}
|
||||
|
||||
if (!CachedSlides.ContainsKey(randomSlide.ModID)) continue;
|
||||
//if (SlidesQueue.Contains(randomSlide)) continue;
|
||||
CachedSlides.Remove(randomSlide.ModID);
|
||||
if(AppState.GcCollect)
|
||||
if (AppState.GcCollect)
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user