summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-04-07 15:58:58 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-04-07 15:58:58 +0000
commitbf3fad9eff30bba4587548303dd3d96f3da5d494 (patch)
tree44f1c25f5009cfc1746e71b858a484315b5ea9b2 /src
parent25e8b874b9f58e5e8035957465252539df13a85d (diff)
Coverity #982: Fix potential NULL dereference.
Diffstat (limited to 'src')
-rw-r--r--src/xkbout.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xkbout.c b/src/xkbout.c
index b69fdfb..7f8c8b5 100644
--- a/src/xkbout.c
+++ b/src/xkbout.c
@@ -392,10 +392,8 @@ XkbServerMapPtr srv;
Bool showActions;
xkb= result->xkb;
- map= xkb->map;
- srv= xkb->server;
- dpy= xkb->dpy;
- if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
+
+ if ((!xkb)||(!xkb->map)||(!xkb->map->syms)||(!xkb->map->key_sym_map)) {
_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
return False;
}
@@ -403,6 +401,11 @@ Bool showActions;
_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBSymbols",0);
return False;
}
+
+ map= xkb->map;
+ srv= xkb->server;
+ dpy= xkb->dpy;
+
if ((xkb->names==NULL)||(xkb->names->symbols==None))
fprintf(file,"xkb_symbols {\n\n");
else fprintf(file,"xkb_symbols \"%s\" {\n\n",