diff options
Diffstat (limited to 'python/google/protobuf/pyext/descriptor_database.cc')
-rw-r--r-- | python/google/protobuf/pyext/descriptor_database.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/google/protobuf/pyext/descriptor_database.cc b/python/google/protobuf/pyext/descriptor_database.cc index 514722b4..daa40cc7 100644 --- a/python/google/protobuf/pyext/descriptor_database.cc +++ b/python/google/protobuf/pyext/descriptor_database.cc @@ -64,6 +64,9 @@ static bool GetFileDescriptorProto(PyObject* py_descriptor, } return false; } + if (py_descriptor == Py_None) { + return false; + } const Descriptor* filedescriptor_descriptor = FileDescriptorProto::default_instance().GetDescriptor(); CMessage* message = reinterpret_cast<CMessage*>(py_descriptor); |