On 12/19/2013 05:27 AM, Juha-Pekka Heikkila wrote:
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com>
---
src/glx/dri_glx.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 0b89e3e..2e00bf0 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -747,13 +747,15 @@ static int
driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
{
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
- struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
- if (psc->swapControl != NULL && pdraw != NULL) {
- psc->swapControl->setSwapInterval(pdp->driDrawable, interval);
- return 0;
- }
+ if (pdraw != NULL) {
+ struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
+ if (psc->swapControl != NULL) {
+ psc->swapControl->setSwapInterval(pdp->driDrawable, interval);
+ return 0;
+ }
+ }
return GLX_BAD_CONTEXT;
}
@@ -761,11 +763,13 @@ static int
driGetSwapInterval(__GLXDRIdrawable *pdraw)
{
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
- struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
- if (psc->swapControl != NULL && pdraw != NULL)
- return psc->swapControl->getSwapInterval(pdp->driDrawable);
+ if (pdraw != NULL) {
+ struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
+ if (psc->swapControl != NULL)
+ return psc->swapControl->getSwapInterval(pdp->driDrawable);
+ }
return 0;
}
For all three: Reviewed-by: Brian Paul <bri...@vmware.com>
I'll push them soon.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev