Open HannesFranke-smartoptics opened 1 year ago
The following code will throw a NullReferenceException:
var graph = new Microsoft.Msagl.Drawing.Graph("graph"); var node = new Microsoft.Msagl.Drawing.Node("node"); graph.AddNode(node); graph.RemoveNode(node);
Because without having displayed the graph https://github.com/microsoft/automatic-graph-layout/blob/ee9232bc292252fe897acb53d85b8ededadae768/GraphLayout/Drawing/Graph.cs#L300
GeometryGraph.Nodes.Remove(node.GeometryObject as Core.Layout.Node);
GeometryGraph is null.
GeometryGraph
The following code will throw a NullReferenceException:
Because without having displayed the graph https://github.com/microsoft/automatic-graph-layout/blob/ee9232bc292252fe897acb53d85b8ededadae768/GraphLayout/Drawing/Graph.cs#L300
GeometryGraph
is null.