diff --git a/GUI.NET/Debugger/LabelManager.cs b/GUI.NET/Debugger/LabelManager.cs index c88252c4..5e04e637 100644 --- a/GUI.NET/Debugger/LabelManager.cs +++ b/GUI.NET/Debugger/LabelManager.cs @@ -99,6 +99,12 @@ namespace Mesen.GUI.Debugger public static bool SetLabel(UInt32 address, AddressType type, string label, string comment, bool raiseEvent = true) { + if(_reverseLookup.ContainsKey(label)) { + //Another identical label exists, we need to remove it + CodeLabel existingLabel = _reverseLookup[label]; + DeleteLabel(existingLabel.Address, existingLabel.AddressType, false); + } + string key = GetKey(address, type); if(_labels.ContainsKey(key)) { _reverseLookup.Remove(_labels[key].Label);