svga: Prevent potential null pointer dereference in vmw_surface.c.
This commit is contained in:
@@ -37,11 +37,13 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
|
||||
{
|
||||
struct pipe_reference *src_ref;
|
||||
struct pipe_reference *dst_ref;
|
||||
struct vmw_svga_winsys_surface *dst = *pdst;
|
||||
|
||||
struct vmw_svga_winsys_surface *dst;
|
||||
|
||||
if(pdst == NULL || *pdst == src)
|
||||
return;
|
||||
|
||||
|
||||
dst = *pdst;
|
||||
|
||||
src_ref = src ? &src->refcnt : NULL;
|
||||
dst_ref = dst ? &dst->refcnt : NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user