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) {
|
if (layout == Guid.Empty) {
|
||||||
return; // FIXME: do something better
|
return; // FIXME: do something better
|
||||||
}
|
}
|
||||||
byte[] layoutBytes = this.plugin.config.Layouts[layout]?.Item2;
|
if (!this.plugin.config.Layouts.TryGetValue(layout, out Tuple<string, byte[]> entry)) {
|
||||||
if (layoutBytes == null) {
|
|
||||||
return; // FIXME: do something better
|
return; // FIXME: do something better
|
||||||
}
|
}
|
||||||
this.plugin.hud.WriteLayout(this.plugin.config.StagingSlot, entry.Item2);
|
this.plugin.hud.WriteLayout(this.plugin.config.StagingSlot, entry.Item2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user