diff --git a/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs b/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs index 70ecc34b8..85b5aeb57 100644 --- a/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs +++ b/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs @@ -97,7 +97,7 @@ public abstract class DebuggerSession: IDisposable /// /// Raised when the debugged process exits /// - public event EventHandler TargetExited; + public event EventHandler TargetExited; /// /// Raised when an exception for which there is a catchpoint is thrown @@ -1040,9 +1040,7 @@ internal protected void OnTargetEvent (TargetEventArgs args) IsConnected = false; HasExited = true; } - EventHandler handler = TargetExited; - if (handler != null) - handler (this, args); + evnt = TargetExited; break; case TargetEventType.TargetHitBreakpoint: lock (slock) {