mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #2373 from BlueBlock/fix_exception_with_notification_on_app_closing
Update MessageFocusDecorator.cs
This commit is contained in:
@@ -62,6 +62,12 @@ namespace mRemoteNG.Messages.WriterDecorators
|
||||
|
||||
private void SwitchToMessage()
|
||||
{
|
||||
// do not attempt to focus the notification panel if the application is closing
|
||||
if (_frmMain == null || _frmMain.IsClosing || !_frmMain.IsAccessible || _frmMain.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_messageWindow.InvokeRequired)
|
||||
{
|
||||
_frmMain.Invoke((MethodInvoker)SwitchToMessage);
|
||||
|
||||
Reference in New Issue
Block a user