diff options
-rw-r--r-- | glx/glxcmds.c | 4 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c index af52672f1..33954ee64 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -146,6 +146,8 @@ __glXContextDestroy(__GLXcontext *context) __glXUnrefDrawable(context->drawPriv); if (context->readPriv) __glXUnrefDrawable(context->readPriv); + context->drawPriv = NULL; + context->readPriv = NULL; } __glXFlushContextCache(); } @@ -621,6 +623,8 @@ DoMakeCurrent(__GLXclientState *cl, __glXUnrefDrawable(prevglxc->drawPriv); if (prevglxc->readPriv) __glXUnrefDrawable(prevglxc->readPriv); + prevglxc->drawPriv = NULL; + prevglxc->readPriv = NULL; } } diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 30308ade4..40352b4fd 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -3159,9 +3159,6 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc; - if (!xf86_config) - return FALSE; - if (xf86_config->num_crtc == 0) return FALSE; crtc = xf86_config->crtc[0]; |