diff --git a/Server/Core/Commands/CommandHandler.cs b/Server/Core/Commands/CommandHandler.cs index a42dd2f6..0cafa490 100644 --- a/Server/Core/Commands/CommandHandler.cs +++ b/Server/Core/Commands/CommandHandler.cs @@ -125,10 +125,16 @@ namespace xServer.Core.Commands Bitmap newScreen = client.Value.StreamCodec.DecodeData(ms); client.Value.LastDesktop = newScreen; - client.Value.FrmRdp.Invoke((MethodInvoker)delegate - { - client.Value.FrmRdp.picDesktop.Image = (Bitmap)newScreen.Clone(); - }); + + try + { + client.Value.FrmRdp.Invoke((MethodInvoker)delegate + { + client.Value.FrmRdp.picDesktop.Image = (Bitmap)newScreen.Clone(); + }); + } + catch + { } newScreen = null; } } @@ -147,10 +153,16 @@ namespace xServer.Core.Commands Bitmap newScreen = client.Value.StreamCodec.DecodeData(ms); client.Value.LastDesktop = newScreen; - client.Value.FrmRdp.Invoke((MethodInvoker) delegate - { - client.Value.FrmRdp.picDesktop.Image = (Bitmap) newScreen.Clone(); - }); + + try + { + client.Value.FrmRdp.Invoke((MethodInvoker)delegate + { + client.Value.FrmRdp.picDesktop.Image = (Bitmap)newScreen.Clone(); + }); + } + catch + { } newScreen = null; }