Merge pull request #43 from d3agle/master

Fixed Server crash when closing the Remote Desktop form while it's still running
This commit is contained in:
MaxXor 2015-04-06 10:38:20 +02:00
commit c61de89cea
1 changed files with 20 additions and 8 deletions

View File

@ -125,10 +125,16 @@ namespace xServer.Core.Commands
Bitmap newScreen = client.Value.StreamCodec.DecodeData(ms);
client.Value.LastDesktop = newScreen;
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;
try
{
client.Value.FrmRdp.Invoke((MethodInvoker)delegate
{
client.Value.FrmRdp.picDesktop.Image = (Bitmap)newScreen.Clone();
});
}
catch
{ }
newScreen = null;
}