summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-06-13 23:04:41 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-06-13 23:04:41 +0000
commit2d087480b4b1207c058efcccc9a72faedcea4651 (patch)
treef8bc83cdda2d66fe0770469007a67f71d4058c7f /src
parente49aea9cef00502fdbd164321f8556478c19a63d (diff)
GLX_BAD_CONTEXT checks in video-sync functions
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/glxapi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index 7ce607a69c..4f3dca8f48 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -588,8 +588,8 @@ glXGetVideoSyncSGI(unsigned int *count)
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
GET_DISPATCH(dpy, t);
- if (!t)
- return 0;
+ if (!t || !glXGetCurrentContext())
+ return GLX_BAD_CONTEXT;
return (t->GetVideoSyncSGI)(count);
}
@@ -599,8 +599,8 @@ glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
struct _glxapi_table *t;
Display *dpy = glXGetCurrentDisplay();
GET_DISPATCH(dpy, t);
- if (!t)
- return 0;
+ if (!t || !glXGetCurrentContext())
+ return GLX_BAD_CONTEXT;
return (t->WaitVideoSyncSGI)(divisor, remainder, count);
}
@@ -614,7 +614,7 @@ glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXConte
struct _glxapi_table *t;
GET_DISPATCH(dpy, t);
if (!t)
- return 0;
+ return False;
return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx);
}