Skip to content

Commit

Permalink
RdpControl.Disconnect can throw if the Ocx is still NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
haefele committed Apr 10, 2024
1 parent 009497a commit b902cd9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void Connect()
/// </summary>
public void Disconnect()
{
if (RdpClient == null || RdpClient.ConnectionState == ConnectionState.Disconnected)
if (RdpClient == null || RdpClient.GetOcx() == null || RdpClient.ConnectionState == ConnectionState.Disconnected)
return;

try
Expand Down

0 comments on commit b902cd9

Please sign in to comment.