Variable "entry" tracked as NULL was dereferenced.

Check entry for non-nullness before dereferencing it

Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
This commit is contained in:
Erkki Seppälä 2011-01-12 15:51:11 +02:00
parent 0edb76d1d5
commit 4115f051e6

View file

@ -462,7 +462,7 @@ XkbKTMapEntryPtr entry = NULL;
if (map_rtrn!=NULL) {
bzero(map_rtrn,type->mods.mask+1);
for (i=0;i<type->map_count;i++) {
if (entry->active) {
if (entry && entry->active) {
map_rtrn[type->map[i].mods.mask]= type->map[i].level;
}
}