Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/protobuf/python/google/protobuf/pyext/descriptor_database.cc

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698