Explorar el Código

Fix to C# support library code

(This was the only use of a HasXyz property for a message type.)
Jon Skeet hace 5 años
padre
commit
ed5c874de3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs

+ 1 - 1
csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs

@@ -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.");
             }