Skip to content

Bug: HeadPose.Equals throws NullReferenceException #234

@HEGIT-TBL

Description

@HEGIT-TBL

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions