Skip to content

Commit c977ab9

Browse files
authored
Merge pull request #175 from brunomikoski/feature/fix-nullfcheck
fix: null check
2 parents 5284efb + 66fadbc commit c977ab9

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)