Index: third_party/protobuf/python/google/protobuf/pyext/descriptor_database.cc |
diff --git a/third_party/protobuf/python/google/protobuf/pyext/descriptor_database.cc b/third_party/protobuf/python/google/protobuf/pyext/descriptor_database.cc |
index 514722b4c383b7ce455d1334eadd40e34ee91519..daa40cc720ac901028106f8170545bd7df44c435 100644 |
--- a/third_party/protobuf/python/google/protobuf/pyext/descriptor_database.cc |
+++ b/third_party/protobuf/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); |