mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix crash when changing state of multiple mods at once.
This commit is contained in:
parent
aa0584078b
commit
856c1d089c
1 changed files with 13 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Dalamud.Logging;
|
||||
using OtterGui.Filesystem;
|
||||
|
|
@ -108,9 +109,19 @@ public partial class ModCollection
|
|||
// Carry changes in collections inherited from forward if they are relevant for this collection.
|
||||
private void OnInheritedModSettingChange( ModSettingChange type, int modIdx, int oldValue, int groupIdx, bool _ )
|
||||
{
|
||||
if( _settings[ modIdx ] == null )
|
||||
switch( type )
|
||||
{
|
||||
ModSettingChanged.Invoke( type, modIdx, oldValue, groupIdx, true );
|
||||
case ModSettingChange.MultiInheritance:
|
||||
case ModSettingChange.MultiEnableState:
|
||||
ModSettingChanged.Invoke( type, modIdx, oldValue, groupIdx, true );
|
||||
return;
|
||||
default:
|
||||
if( _settings[ modIdx ] == null )
|
||||
{
|
||||
ModSettingChanged.Invoke( type, modIdx, oldValue, groupIdx, true );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue