diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2017-06-14 15:39:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 15:39:23 -0700 |
commit | 8389aa29772c86cb961a131e0c81d5b46a48e1b9 (patch) | |
tree | 99f0230203625f998802898aad577ddab1bd2dbb | |
parent | 82cbdc86acd060269913a36f86f437db41bd740b (diff) | |
parent | 0a9b07ba86cd4aa620d0b061a56d239f40795e39 (diff) |
Merge pull request #84 from TeBoring/master
Fix upb load descriptor when no messages defined in prorto.
-rw-r--r-- | upb/def.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |