aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Events.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-01-30 18:38:25 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commitf578b86d34f5858fa215f6eebc12fec82f16792e (patch)
treee772dc0fdfa15de8c3fcaf1ca7218607df3f2a0d /nx-X11/programs/Xserver/hw/nxagent/Events.c
parent75acbbf299b57aeae993b73927fd8b727be94c81 (diff)
downloadnx-libs-f578b86d34f5858fa215f6eebc12fec82f16792e.tar.gz
nx-libs-f578b86d34f5858fa215f6eebc12fec82f16792e.tar.bz2
nx-libs-f578b86d34f5858fa215f6eebc12fec82f16792e.zip
Clipboard.c: rework nxagentFind*SelectionIndex() helpers
Let them return -1 which makes it easier to check for successful execution.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 2ec17c328..d29ed9bcd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -2850,7 +2850,7 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
Atom local = nxagentRemoteToLocalAtom(xfixesEvent -> xfixesselection.selection);
int index = nxagentFindCurrentSelectionIndex(local);
- if (index < NumCurrentSelections)
+ if (index != -1)
{
if (CurrentSelections[index].client != 0)
{