aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/swap_interval.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-14 17:14:58 +0000
committermarha <marha@users.sourceforge.net>2010-01-14 17:14:58 +0000
commit8bbcd844049eb1296ccd25aca75bf3b08f28facb (patch)
treea4b168a1b2c686548550719b094e982124696f3d /xorg-server/glx/swap_interval.c
parent5eaf49ad7feec1f2043ecb1b90c04c534ce29f46 (diff)
parentb152ebf4b66368e1cbfda1ae81cef29bf9c00bb7 (diff)
downloadvcxsrv-8bbcd844049eb1296ccd25aca75bf3b08f28facb.tar.gz
vcxsrv-8bbcd844049eb1296ccd25aca75bf3b08f28facb.tar.bz2
vcxsrv-8bbcd844049eb1296ccd25aca75bf3b08f28facb.zip
svn merge ^/branches/released .
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 03f83cb89..d8b4ab2b6 100644
--- a/xorg-server/glx/swap_interval.c
+++ b/xorg-server/glx/swap_interval.c
@@ -57,8 +57,6 @@ int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
cx = __glXLookupContextByTag(cl, tag);
- LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __FUNCTION__ ,
- cx, (cx == NULL) ? NULL : cx->pGlxScreen);
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
client->errorValue = tag;
return __glXError(GLXBadContext);
@@ -72,7 +70,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;
@@ -80,6 +78,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;
}