check if ext->name is null before strcmp()

This commit is contained in:
Brian Paul
2006-08-31 13:58:08 +00:00
parent 901f83f14e
commit 52e36cd8d9
+1 -1
View File
@@ -961,7 +961,7 @@ lookup_extension(Display *dpy, const char *extName)
{
_XExtension *ext;
for (ext = dpy->ext_procs; ext; ext = ext->next) {
if (strcmp(ext->name, extName) == 0) {
if (ext->name && strcmp(ext->name, extName) == 0) {
return ext;
}
}