summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-09-15 18:31:07 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-09-15 18:31:07 +0200
commit0469465c31371177d85ab7af103359500323c1f8 (patch)
treee10f9918ac8382d2d725e1b81f5aae177c29301f /src/gallium/state_trackers
parent45cf2696ca2ad5f2ef77a3c35ee1d0ab1709b1da (diff)
st/xorg: Only unreference texture on pixmap destruction, don't destroy it.
Fixes memory corruption if e.g. the driver still has references to the texture.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 88149b9d5c..75524891f7 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -466,14 +466,11 @@ static void
ExaDestroyPixmap(ScreenPtr pScreen, void *dPriv)
{
struct exa_pixmap_priv *priv = (struct exa_pixmap_priv *)dPriv;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- modesettingPtr ms = modesettingPTR(pScrn);
if (!priv)
return;
- if (priv->tex)
- ms->screen->texture_destroy(priv->tex);
+ pipe_texture_reference(&priv->tex, NULL);
xfree(priv);
}