Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
This repository was archived by the owner on May 9, 2025. It is now read-only.

SetValue to null causes NullPointerException #162

@Haytam95

Description

@Haytam95

Hi, if I try to cleanup a Variable by setting null value, it raises NullPointerException.

I've fixed this issue changing in BaseVariable.cs:

 public override T SetValue(T value)
{
            T oldValue = _value;
            T newValue = base.SetValue(value);


            if(newValue != null && !newValue.Equals(oldValue)) // <---- This, null check
            {
                _event.Invoke(newValue);
            }

            return newValue;
}

Maybe it could be added to the code? :)

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