fix: ensure prop is not null

This commit is contained in:
2026-06-18 17:20:26 -03:00
parent d79017ed6a
commit 1354874bb2
+1 -1
View File
@@ -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)