fix: don't crash on using delete layout
This commit is contained in:
parent
3c49f8d3d0
commit
c761d4b07c
|
@ -344,8 +344,7 @@ namespace HudSwap {
|
|||
if (layout == Guid.Empty) {
|
||||
return; // FIXME: do something better
|
||||
}
|
||||
byte[] layoutBytes = this.plugin.config.Layouts[layout]?.Item2;
|
||||
if (layoutBytes == null) {
|
||||
if (!this.plugin.config.Layouts.TryGetValue(layout, out Tuple<string, byte[]> entry)) {
|
||||
return; // FIXME: do something better
|
||||
}
|
||||
this.plugin.hud.WriteLayout(this.plugin.config.StagingSlot, entry.Item2);
|
||||
|
|
Loading…
Reference in New Issue