diff options
author | Marshall Lerner <malerner@microsoft.com> | 2022-02-16 20:00:33 +0300 |
---|---|---|
committer | Marshall Lerner <malerner@microsoft.com> | 2022-02-16 20:00:33 +0300 |
commit | 3160eeb4267f48768bbb87b153813ce4157ecfad (patch) | |
tree | 4077adc87c0eefc9c49f00c4a737c8f379a6110d | |
parent | 3997eb9e5108bc5f96c989d2ce298d62ea1f018b (diff) |
Null/Empty check before trying to resolve the path because it throws otherwise
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs index 883e169..cb29455 100644 --- a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs +++ b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs @@ -135,7 +135,7 @@ namespace Mono.Debugging.Client if (IsReadOnly) return false; - if (be is Breakpoint bp) { + if (be is Breakpoint bp && !string.IsNullOrEmpty (bp.FileName)) { bp.SetFileName (ResolveFullPath(bp.FileName)); } @@ -658,7 +658,7 @@ namespace Mono.Debugging.Client System.Diagnostics.Debug.Assert (System.Threading.Monitor.IsEntered (breakpointLock), "SetBreakpoints must be called during a lock"); foreach (BreakEvent be in newBreakpoints) { - if (be is Breakpoint bp) { + if (be is Breakpoint bp && !string.IsNullOrEmpty(bp.FileName)) { bp.SetFileName (ResolveFullPath(bp.FileName)); } } |