Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: HeadPose.Equals throws NullReferenceException #234

Open
HEGIT-TBL opened this issue Oct 3, 2023 · 0 comments
Open

Bug: HeadPose.Equals throws NullReferenceException #234

HEGIT-TBL opened this issue Oct 3, 2023 · 0 comments

Comments

@HEGIT-TBL
Copy link

Installed product versions

Product Type Name Version
Visual Studio VS 2022 community v17.7.4
NuGet Package FaceRecognitionDotNet.CUDA112 v1.3.0.7

Description

HeadPose's equality method/methods do not take null into consideration and throw System.NullReferenceException.

Steps to recreate

Run the following code with NuGet package installed

using FaceRecognitionDotNet;

HeadPose hp = null;
var isNull = hp == null;

Expected behavior

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

Current behavior

hp == null throws System.NullReferenceException
at FaceRecognitionDotNet.HeadPose.op_Equality(HeadPose pose1, HeadPose pose2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant