aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
diff options
context:
space:
mode:
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);