st/xorg: Prevent potential null pointer deference in xorg_xv.c.
authorVinson Lee <vlee@vmware.com>
Sun, 22 Nov 2009 06:10:38 +0000 (01:10 -0500)
committerVinson Lee <vlee@vmware.com>
Sun, 22 Nov 2009 06:10:38 +0000 (01:10 -0500)
src/gallium/state_trackers/xorg/xorg_xv.c

index a1e74fad598b0303f6702dd555e8ec6ab5905891..e7f4900528d8aa6cdddd246473ece2c1b1516c05 100644 (file)
@@ -446,7 +446,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
    int x, y, w, h;
    struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap);
 
-   if (!dst->tex) {
+   if (dst && !dst->tex) {
        xorg_exa_set_shared_usage(pPixmap);
        pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL);
    }