oyq28 8 months ago
parent
commit
f7f811101c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      opcua/Form_Main.cs

+ 1 - 1
opcua/Form_Main.cs

@@ -582,7 +582,7 @@ namespace IMCS
                             // 删除map中对应的bean
                             opcServerMap.Remove(opcBody.ServerUrl);
                             // 断开连接
-                            if (opcServer.Session != null)
+                            if (opcServer!=null && opcServer.Session != null)
                             {
                                 opcServer.Disconnect();
                             }