stubs/atom.c: check for ResizeHashTable failure

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith
2019-08-17 13:41:02 -07:00
parent 3e0e36e4a9
commit 78085e6b68

View File

@@ -189,7 +189,9 @@ __libxfont_internal__MakeAtom(const char *string, unsigned len, int makeit)
a->atom = ++lastAtom;
a->hash = hash;
if (hashUsed >= hashSize / 2) {
ResizeHashTable();
if ((ResizeHashTable() == FALSE) &&
((hashTable == NULL) || (hashUsed == hashSize)))
return None;
h = hash & hashMask;
if (hashTable[h]) {
r = (hash % rehash) | 1;