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();
                             }