From ba898dfcde038052c9eb9be043e9d48b18652cca Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 10 Mar 2021 10:04:50 +0100 Subject: Clipboard.c: improve debug output in special case This avoids an error message in a special case: nxagentRemoteToLocalAtom: WARNING failed to get name from remote atom. --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 17b14f728..dde5506fa 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -436,7 +436,10 @@ void nxagentDumpClipboardStat(void) } fprintf(stderr, "\n"); - fprintf(stderr, " serverLastRequestedSelection [% 4ld][%s]\n", serverLastRequestedSelection, NameForRemAtom(serverLastRequestedSelection)); + if (serverLastRequestedSelection == -1) + fprintf(stderr, " serverLastRequestedSelection [-1](uninitialized)\n"); + else + fprintf(stderr, " serverLastRequestedSelection [% 4ld][%s]\n", serverLastRequestedSelection, NameForRemAtom(serverLastRequestedSelection)); fprintf(stderr, "Compile time settings\n"); #ifdef PRINT_CLIPBOARD_CONTENT_ON_DEBUG -- cgit v1.2.3