Fix upb load descriptor when no messages defined in prorto.

pull/13171/head
Bo Yang 8 years ago
parent 04fcf0b112
commit 0a9b07ba86
  1. 3
      upb/def.c

@ -2309,6 +2309,9 @@ bool upb_symtab_addfile(upb_symtab *s, upb_filedef *file, upb_status *status) {
bool ret;
n = upb_filedef_defcount(file);
if (n == 0) {
return true;
}
defs = upb_gmalloc(sizeof(*defs) * n);
if (defs == NULL) {

Loading…
Cancel
Save