summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/drm
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-22 01:26:32 -0500
committerVinson Lee <[email protected]>2009-11-22 01:26:32 -0500
commit57d389aab5ea4462475756c0e262f3cb543f889d (patch)
treec7edd5edf03fd79c678da9ed039f3e92efe6a41d /src/gallium/winsys/drm
parentb62a74d3b94024bc08b31394f827761d354d2516 (diff)
svga: Prevent potential null pointer deference in vmw_surface.c.
Diffstat (limited to 'src/gallium/winsys/drm')
-rw-r--r--src/gallium/winsys/drm/vmware/core/vmw_surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/drm/vmware/core/vmw_surface.c b/src/gallium/winsys/drm/vmware/core/vmw_surface.c
index 9ec4bf92726..c19e556df9f 100644
--- a/src/gallium/winsys/drm/vmware/core/vmw_surface.c
+++ b/src/gallium/winsys/drm/vmware/core/vmw_surface.c
@@ -39,7 +39,7 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
struct pipe_reference *dst_ref;
struct vmw_svga_winsys_surface *dst = *pdst;
- if(*pdst == src || pdst == NULL)
+ if(pdst == NULL || *pdst == src)
return;
src_ref = src ? &src->refcnt : NULL;