fix: ensure prop is not null
This commit is contained in:
@@ -166,7 +166,7 @@ class Dumper
|
|||||||
private bool TryGetProp<T>(IEnumerable<FPropertyTag> properties, string propName, out T value)
|
private bool TryGetProp<T>(IEnumerable<FPropertyTag> properties, string propName, out T value)
|
||||||
{
|
{
|
||||||
FPropertyTag? prop = properties.FirstOrDefault(p => p.Name.Text == propName);
|
FPropertyTag? prop = properties.FirstOrDefault(p => p.Name.Text == propName);
|
||||||
if (prop?.Tag != null)
|
if (prop != null && prop.Tag != null)
|
||||||
{
|
{
|
||||||
T? val = prop.Tag.GetValue<T>();
|
T? val = prop.Tag.GetValue<T>();
|
||||||
if (val != null)
|
if (val != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user