Skip to content

Commit 66fadbc

Browse files
Bruno MikoskiBruno Mikoski
authored andcommitted
fix: null check
1 parent 80da6e3 commit 66fadbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Scripts/Editor/Generators/CollectionGenerators.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ private static void CopyFieldToSerializedProperty(
268268
return;
269269

270270
// Get the property to copy the value to.
271-
serializedObject.TryFindProperty(field.Name, out SerializedProperty serializedProperty);
271+
if(!serializedObject.TryFindProperty(field.Name, out SerializedProperty serializedProperty))
272+
return;
272273

273274
object value = field.GetValue(owner);
274275

0 commit comments

Comments
 (0)