aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/swap_interval.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-14 10:44:09 +0000
committermarha <marha@users.sourceforge.net>2010-01-14 10:44:09 +0000
commitb152ebf4b66368e1cbfda1ae81cef29bf9c00bb7 (patch)
treeca2990ba0e447003b16ef239d3bdb30fdd8dc792 /xorg-server/glx/swap_interval.c
parent13863345017a14a9dcce2ea5d3833eb74bb3760f (diff)
downloadvcxsrv-b152ebf4b66368e1cbfda1ae81cef29bf9c00bb7.tar.gz
vcxsrv-b152ebf4b66368e1cbfda1ae81cef29bf9c00bb7.tar.bz2
vcxsrv-b152ebf4b66368e1cbfda1ae81cef29bf9c00bb7.zip
Git update 14/1/2010
Diffstat (limited to 'xorg-server/glx/swap_interval.c')
-rw-r--r--xorg-server/glx/swap_interval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xorg-server/glx/swap_interval.c b/xorg-server/glx/swap_interval.c
index 3a5242022..0bae3247e 100644
--- a/xorg-server/glx/swap_interval.c
+++ b/xorg-server/glx/swap_interval.c
@@ -53,8 +53,6 @@ int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
cx = __glXLookupContextByTag(cl, tag);
- LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __func__,
- cx, (cx == NULL) ? NULL : cx->pGlxScreen);
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
client->errorValue = tag;
return __glXError(GLXBadContext);
@@ -68,7 +66,7 @@ int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
if (cx->drawPriv == NULL) {
client->errorValue = tag;
- return __glXError(GLXBadDrawable);
+ return BadValue;
}
pc += __GLX_VENDPRIV_HDR_SIZE;
@@ -76,6 +74,9 @@ int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
? bswap_32(*(int *)(pc + 0))
: *(int *)(pc + 0);
+ if (interval <= 0)
+ return BadValue;
+
(void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval);
return Success;
}