You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: v3.11.4
Language: C#
What operating system (Linux, Windows, ...) and version?
mac 10.14.6
What runtime / compiler are you using (e.g., python version or gcc version)
.NET Core 3.1.0
What did you do?
Use method FileDescriptor.GetOption.
If the proto file sets the options, it works. But if it is not set, throws NullReferenceException
System.NullReferenceException : Object reference not set to an instance of an object.
at Google.Protobuf.Reflection.FileDescriptor.GetOption[T](Extension`2 extension)
at AElf.FileDescriptorExtensions.GetIdentity(FileDescriptor descriptor) in /Users/zhangxin/code/AElf/src/AElf.Types/Protobuf/FileDescriptorExtensions.cs:line 9
I think we should check if this.Proto.Options is null. If null, the default value is returned.
Google.Protobuf.Reflection.FileDescriptor.cs
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Version: v3.11.4
Language: C#
What operating system (Linux, Windows, ...) and version?
mac 10.14.6
What runtime / compiler are you using (e.g., python version or gcc version)
.NET Core 3.1.0
What did you do?
Use method FileDescriptor.GetOption.
If the proto file sets the options, it works. But if it is not set, throws NullReferenceException
I think we should check if this.Proto.Options is null. If null, the default value is returned.
Google.Protobuf.Reflection.FileDescriptor.cs
The text was updated successfully, but these errors were encountered: