Skip to content

Commit

Permalink
fix: make sure resolved typedef isn't null (#731)
Browse files Browse the repository at this point in the history
* fix: make sure resolved typedef isn't null

* re-use variable
  • Loading branch information
Lymdun committed Mar 26, 2021
1 parent 1cb05fc commit 2f6414f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Assets/Mirage/Weaver/Processors/SyncObjectProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ public void ProcessSyncObjects(TypeDefinition td)
continue;
}

if (fd.FieldType.Resolve().ImplementsInterface<ISyncObject>())
TypeDefinition tf = fd.FieldType.Resolve();
if (tf == null)
{
continue;
}

if (tf.ImplementsInterface<ISyncObject>())
{
if (fd.IsStatic)
{
Expand Down

0 comments on commit 2f6414f

Please sign in to comment.