Fix some unnecessary crashes on mtrl.

This commit is contained in:
Ottermandias 2022-09-25 18:32:31 +02:00
parent b359c18360
commit 35c6e0ec88
3 changed files with 24 additions and 9 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using Dalamud.Interface;
using ImGuiNET;
@ -259,7 +260,7 @@ public partial class ModEditWindow
private static bool DrawMaterialColorSetChange( MtrlFile file, bool disabled )
{
if( file.ColorSets.Length == 0 )
if( !file.ColorSets.Any(c => c.HasRows ) )
{
return false;
}