mirror of
https://github.com/SwallowOS/xorg_lib_libxfont
synced 2025-12-27 12:51:05 +08:00
stubs/atom.c: check for ResizeHashTable failure
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user