Thu, 01/20/2022 - 06:46
Forums:
Hello,
I try to develop a simple CAM software in C# winform. Now when I change the selection mode to Solid or Face ...etc, and if I click nothing in the cad model(position like the image file attached, and I have already written if selected shape is null condition but it doesn't work), it will raise error in Standard_Handle.hxx about System.NullReferenceException. Can anyone give me suggestion. Thanks a lot.
Sincerely, Steven
Attachments:
Thu, 01/20/2022 - 09:55
The most straightforward approach would be debugging application and fixing NULL-dereference by adding missing .IsNull() check. That all that one could read from attached screenshot.
Thu, 01/20/2022 - 16:43
Thank you for your hint, Mr. Gavrilov. I use AIS_InteractiveContext::HasDetectedShape(), and it works!