Skip to content

Commit

Permalink
Fix to C# support library code
Browse files Browse the repository at this point in the history
(This was the only use of a HasXyz property for a message type.)
  • Loading branch information
jskeet committed May 1, 2020
1 parent 9926c95 commit ed5c874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
Expand Up @@ -394,7 +394,7 @@ internal void CrossLink()

File.DescriptorPool.AddFieldByNumber(this);

if (ContainingType != null && ContainingType.Proto.HasOptions && ContainingType.Proto.Options.MessageSetWireFormat)
if (ContainingType != null && ContainingType.Proto.Options != null && ContainingType.Proto.Options.MessageSetWireFormat)
{
throw new DescriptorValidationException(this, "MessageSet format is not supported.");
}
Expand Down

0 comments on commit ed5c874

Please sign in to comment.