summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2004-03-02 00:09:07 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2004-03-02 00:09:07 +0000
commitafaa10519a71b6ecce546ca7afca18002985b0c8 (patch)
tree627e51c2e98c77554a939ec16f81f396fc36936e
parentfd0ee4bdf5c7a26175c556a8214d70249d56b349 (diff)
Fix lbxproxy crash in VSW5 Xlib3/XCloseDisplay test (fd.o bugzilla #250,
fix by Derek.Wang@Sun.COM)
-rw-r--r--di/resource.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/di/resource.c b/di/resource.c
index 2b7811e..274a5a2 100644
--- a/di/resource.c
+++ b/di/resource.c
@@ -1,4 +1,5 @@
/* $Xorg: resource.c,v 1.4 2000/08/17 19:53:56 cpqbld Exp $ */
+/* $XdotOrg$ */
/*
Copyright 1987, 1998 The Open Group
@@ -471,10 +472,12 @@ LookupIDByType(pclient, id, rtype)
if (pserver->clientTable[i].buckets) {
for (j = 0; j < INITBUCKETS; j++) {
if (pserver->clientTable[i].resources[j]) {
- res = pserver->clientTable[i].resources[Hash(j, id)];
- for (; res; res = res->next)
- if ((res->id == id) && (res->type == rtype))
- return res->value;
+ if (clients[j]) {
+ res = pserver->clientTable[i].resources[Hash(j, id)];
+ for (; res; res = res->next)
+ if ((res->id == id) && (res->type == rtype))
+ return res->value;
+ }
}
}
}