svga: Prevent potential null pointer deference in vmw_surface.c.

This commit is contained in:
Vinson Lee 2009-11-22 01:26:32 -05:00
parent b62a74d3b9
commit 57d389aab5

View file

@ -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;