oyq28 преди 8 месеца
родител
ревизия
f7f811101c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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();
                             }