aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-03 23:20:42 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:07 +0200
commitf14e80077c5640d2a3e2e9898dda37ef44ffeb38 (patch)
treee1f07165139994c5e58dfd849618f170ab85c626 /nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
parent3a3a3373c36b5af6208ee5fdfe25e64b5766b75a (diff)
downloadnx-libs-f14e80077c5640d2a3e2e9898dda37ef44ffeb38.tar.gz
nx-libs-f14e80077c5640d2a3e2e9898dda37ef44ffeb38.tar.bz2
nx-libs-f14e80077c5640d2a3e2e9898dda37ef44ffeb38.zip
Clipboard.c: do not send notify when pointer is NULL
There was only one place where this was checked but we check it always.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index fe5c7d2c9..c3314d6dd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -714,6 +714,14 @@ FIXME: Do we need this?
void nxagentSendSelectionNotify(Atom property)
{
+ if (lastClientClientPtr == NULL)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "%s: lastClientClientPtr is NULL - doing nothing.\n", __func__);
+ #endif
+ return;
+ }
+
xEvent x;
#ifdef DEBUG
@@ -920,10 +928,7 @@ void nxagentCollectPropertyEvent(int resource)
fprintf (stderr, "%s: WARNING! Invalid property value.\n", __func__);
#endif
- if (lastClientClientPtr != NULL)
- {
- nxagentSendSelectionNotify(None);
- }
+ nxagentSendSelectionNotify(None);
lastClientWindowPtr = NULL;
SetClientSelectionStage(None);