Skip to content

Following() throws an error #492

@Hyeoncheol-Kang

Description

@Hyeoncheol-Kang

Information

  • ClassicUO Version: 1.1.0.174
  • ClassicAssist Version: 4.5.2
  • Client Version: 7.0.107.76
  • Shard: Margo 222.102.202.108 2594

Describe the bug
Any attempt to use the Following() function gives the following error:

"Cannot perform runtime binding on a null reference"

To Reproduce
Steps to reproduce the behavior:

call "Following()"


It seems to be an issue occurring in ClassicUO version 1.1.x.x or above.

In the Reflection class of ClassicAssist.Helpers, the following code returns null:

public static T GetTypePropertyValue<T>(Type type, string property, object obj = null, 
            BindingFlags bindingFlags = BindingFlags.Default)
        {
            PropertyInfo propertyInfo = type.GetProperty(property);

////////
            T val = (T) propertyInfo?.GetValue(obj, null);
////////
            // ReSharper disable once ConvertIfStatementToReturnStatement
            if (val == null)
            {
                return default;
            }

            return val;
        }

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