Open HEGIT-TBL opened 1 year ago
HeadPose's equality method/methods do not take null into consideration and throw System.NullReferenceException.
HeadPose
null
System.NullReferenceException
Run the following code with NuGet package installed
using FaceRecognitionDotNet; HeadPose hp = null; var isNull = hp == null;
As per MSDN:
Implementations of Equals must not throw exceptions; they should always return a value.
So in this case hp == null should return true
hp == null
true
hp == null throws System.NullReferenceException at FaceRecognitionDotNet.HeadPose.op_Equality(HeadPose pose1, HeadPose pose2)
at FaceRecognitionDotNet.HeadPose.op_Equality(HeadPose pose1, HeadPose pose2)
Installed product versions
Description
HeadPose
's equality method/methods do not takenull
into consideration and throwSystem.NullReferenceException
.Steps to recreate
Run the following code with NuGet package installed
Expected behavior
As per MSDN:
So in this case
hp == null
should returntrue
Current behavior
hp == null
throwsSystem.NullReferenceException
at FaceRecognitionDotNet.HeadPose.op_Equality(HeadPose pose1, HeadPose pose2)