aboutsummaryrefslogtreecommitdiff
path: root/libXt/src/Selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'libXt/src/Selection.c')
-rw-r--r--libXt/src/Selection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libXt/src/Selection.c b/libXt/src/Selection.c
index 101ea6aaa..f35cb440c 100644
--- a/libXt/src/Selection.c
+++ b/libXt/src/Selection.c
@@ -237,6 +237,7 @@ static void FreeSelectionProperty(
Atom prop)
{
SelectionProp p;
+ int propCount;
PropList sarray;
if (prop == None) return;
LOCK_PROCESS;
@@ -247,7 +248,9 @@ static void FreeSelectionProperty(
"internal error: no selection property context for display",
(String *)NULL, (Cardinal *)NULL );
UNLOCK_PROCESS;
- for (p = sarray->list; p; p++)
+ for (p = sarray->list, propCount=sarray->propCount;
+ propCount;
+ p++, propCount--)
if (p->prop == prop) {
p->avail = TRUE;
return;