[Bug] Access violation in Curve.Split(Brep,double) if no intersections found

Running the command below will give an AccessViolationException in Rhino 5SR4

protected override Result RunCommand(RhinoDoc doc, RunMode mode)
    Curve c = new Line(Point3d.Origin, new Point3d(1, 0, 0)).ToNurbsCurve();
    Box b = new Box(new BoundingBox(2, 0, 0, 3, 1, 1));
    Brep brep = b.ToBrep();

    Curve[] result = c.Split(brep, RhinoMath.ZeroTolerance); // throws access violation exception
    if (null != result)
        foreach (var crv in result)

    return Result.Success;

YES!!! Thank you so much for providing this sample. I see the bug and am in the process of fixing it. I’ll try to get this into SR6

Wow, I’m happy if you are :smile:

This will be fixed in SR6. Thanks again.