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:
parent
184ef0d356
commit
2475ef6097
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user