From ea3beb94b057f1b9f934d05565b9af3732007e5f Mon Sep 17 00:00:00 2001 From: Sergey Udaltsov Date: Thu, 4 Mar 2004 22:54:24 +0000 Subject: fix for Solaris by Niall - though I still do not understand how dpy can be NULL --- libxklavier/xklavier_xkb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libxklavier/xklavier_xkb.c') diff --git a/libxklavier/xklavier_xkb.c b/libxklavier/xklavier_xkb.c index 8e190fb..80f83cd 100644 --- a/libxklavier/xklavier_xkb.c +++ b/libxklavier/xklavier_xkb.c @@ -39,9 +39,14 @@ int XklInit( Display * a_dpy ) _xklDefaultErrHandler = XSetErrorHandler( ( XErrorHandler ) _XklErrHandler ); + if( !a_dpy ) + { + return -1; + } + _xklDpy = a_dpy; #ifdef XKB_HEADERS_PRESENT /* Lets begin */ - _xklXkbExtPresent = XkbQueryExtension( _xklDpy = a_dpy, + _xklXkbExtPresent = XkbQueryExtension( _xklDpy, &opcode, &_xklXkbEventType, &_xklXkbError, NULL, NULL ); if( !_xklXkbExtPresent ) -- cgit v1.2.1