xkb: Fix NULL pointer dereference

xkb->names is dereferenced in else path too.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Pauli Nieminen 2010-07-22 12:48:55 +03:00 committed by Peter Hutterer
parent 184ef0d356
commit 2475ef6097

View File

@ -686,7 +686,11 @@ int nRead=0;
if ((tmp=XkmGetCountedString(file,buf,100))<1)
return -1;
nRead+= tmp;
if ((buf[0]!='\0')&&(xkb->names)) {
if (!xkb->names)
continue;
if (buf[0]!='\0') {
Atom name;
name= XkbInternAtom(buf,0);
xkb->names->groups[i]= name;