oyq28 před 8 měsíci
rodič
revize
f7f811101c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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();
                             }