diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-10-31 23:44:15 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-12-22 22:01:31 +0100 |
commit | 633f4617b6720bcac8e0ead9e46fd14b60d598e6 (patch) | |
tree | 4b22440771d177198b9591434b550c930e0eafc5 /nx-X11/lib | |
parent | a61b1a72dc91503b34e3260262fb201191fab887 (diff) | |
download | nx-libs-633f4617b6720bcac8e0ead9e46fd14b60d598e6.tar.gz nx-libs-633f4617b6720bcac8e0ead9e46fd14b60d598e6.tar.bz2 nx-libs-633f4617b6720bcac8e0ead9e46fd14b60d598e6.zip |
XlibInt: check for XlibError before accessing other dpy fields
This fixes an assertion being triggered on reconnect:
assertion=assertion@entry=0x7f2f0bba6510 "(dpy->flags & XlibDisplayPrivSync) != 0", file=file@entry=0x7f2f0bba62fc "XlibInt.c", line=line@entry=895,
Diffstat (limited to 'nx-X11/lib')
-rw-r--r-- | nx-X11/lib/src/XlibInt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nx-X11/lib/src/XlibInt.c b/nx-X11/lib/src/XlibInt.c index 88698daa3..36e650193 100644 --- a/nx-X11/lib/src/XlibInt.c +++ b/nx-X11/lib/src/XlibInt.c @@ -892,6 +892,16 @@ void _XSeqSyncFunction( static int _XPrivSyncFunction (Display *dpy) { +#ifdef NX_TRANS_SOCKET + if (dpy->flags & XlibDisplayIOError) + { +#ifdef NX_TRANS_DEBUG + fprintf(stderr, "%s: Returning 0 with I/O error detected.\n", __func__); +#endif + return 0; + } +#endif /* NX_TRANS_SOCKET */ + #ifdef XTHREADS assert(!dpy->lock_fns); #endif |