File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,10 +74,11 @@ private static CommandOutletContent Dump(OpcNode node)
7474 if ( ! string . IsNullOrEmpty ( node . Label ) )
7575 content . Last . Append ( CommandOutletColor . DarkGray , $ " { node . Label } ") ;
7676
77- content . Last
78- . Append ( CommandOutletColor . DarkCyan , '(' )
79- . Append ( CommandOutletColor . DarkYellow , node . Type )
80- . Append ( CommandOutletColor . DarkCyan , ')' ) ;
77+ if ( node . Type != null )
78+ content . Last
79+ . Append ( CommandOutletColor . DarkCyan , '(' )
80+ . Append ( CommandOutletColor . DarkYellow , node . Type )
81+ . Append ( CommandOutletColor . DarkCyan , ')' ) ;
8182
8283 if ( ! string . IsNullOrEmpty ( node . Description ) && ! string . Equals ( node . Label , node . Description ) )
8384 content . Last . Append ( CommandOutletColor . DarkGray , $ " { node . Description } ") ;
Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ partial class OpcNodeType
102102 internal static OpcNodeType Get ( ExpandedNodeId id ) => Get ( ( NodeId ) id ) ;
103103 internal static OpcNodeType Get ( NodeId id )
104104 {
105+ if ( id == null || id . IsNullNodeId )
106+ return null ;
107+
105108 if ( _types . TryGetValue ( id , out var type ) )
106109 return type ;
107110
You can’t perform that action at this time.
0 commit comments