diff --git a/OpcUaHelper/Forms/FormBrowseServer.cs b/OpcUaHelper/Forms/FormBrowseServer.cs index acabbf7..72f8c8f 100644 --- a/OpcUaHelper/Forms/FormBrowseServer.cs +++ b/OpcUaHelper/Forms/FormBrowseServer.cs @@ -150,9 +150,13 @@ private void M_OpcUaClient_ConnectComplete(object sender, EventArgs e) { try { - // populate the browse view. - PopulateBranch(ObjectIds.ObjectsFolder, BrowseNodesTV.Nodes); - BrowseNodesTV.Enabled = true; + OpcUaClient client = (OpcUaClient)sender; + if (client.Connected) + { + // populate the browse view. + PopulateBranch(ObjectIds.ObjectsFolder, BrowseNodesTV.Nodes); + BrowseNodesTV.Enabled = true; + } } catch (Exception exception) {