summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-03-27 16:22:00 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-03-27 16:22:00 +0200
commit32225d06b9ade78df612b3fd8c3aff93afa3b7ff (patch)
treee2259bb1b489ec8ba6cc3d3fc958947bf92fe6d2 /src/mesa/drivers/dri
parenta83593922218b3fc88d3e553f8db079b188bd068 (diff)
r128, radeon, r200: Check ctx->WinSysDrawBuffer before calling function that dereferences it.
Same fix as for r300 (which fixed https://bugs.freedesktop.org/show_bug.cgi?id=10417), since it's likely an issue with those drivers too.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r128/r128_lock.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_lock.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lock.c6
3 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_lock.c b/src/mesa/drivers/dri/r128/r128_lock.c
index 393dd1ed74..ea23b007f3 100644
--- a/src/mesa/drivers/dri/r128/r128_lock.c
+++ b/src/mesa/drivers/dri/r128/r128_lock.c
@@ -52,8 +52,10 @@ static void
r128UpdatePageFlipping( r128ContextPtr rmesa )
{
rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip;
- driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
- rmesa->sarea->pfCurrentPage);
+ if (rmesa->glCtx->WinSysDrawBuffer) {
+ driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+ rmesa->sarea->pfCurrentPage);
+ }
rmesa->new_state |= R128_NEW_WINDOW;
}
diff --git a/src/mesa/drivers/dri/r200/r200_lock.c b/src/mesa/drivers/dri/r200/r200_lock.c
index 9ffdb2b212..b050dd7802 100644
--- a/src/mesa/drivers/dri/r200/r200_lock.c
+++ b/src/mesa/drivers/dri/r200/r200_lock.c
@@ -53,8 +53,10 @@ static void
r200UpdatePageFlipping( r200ContextPtr rmesa )
{
rmesa->doPageFlip = rmesa->sarea->pfState;
- driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
- rmesa->sarea->pfCurrentPage);
+ if (rmesa->glCtx->WinSysDrawBuffer) {
+ driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+ rmesa->sarea->pfCurrentPage);
+ }
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c
index cdf8a19fb1..312041e035 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lock.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lock.c
@@ -56,8 +56,10 @@ static void
radeonUpdatePageFlipping( radeonContextPtr rmesa )
{
rmesa->doPageFlip = rmesa->sarea->pfState;
- driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
- rmesa->sarea->pfCurrentPage);
+ if (rmesa->glCtx->WinSysDrawBuffer) {
+ driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+ rmesa->sarea->pfCurrentPage);
+ }
}