|
@@ -394,7 +394,7 @@ namespace Google.Protobuf.Reflection
|
|
|
|
|
|
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.");
|
|
|
}
|