Skip to content

Commit

Permalink
vo_direct3d: remove redundant condition
Browse files Browse the repository at this point in the history
talloc_free is safe to call with NULL.
  • Loading branch information
kasper93 authored and Dudemanguy committed Nov 18, 2023
1 parent 4d8c074 commit 6e161ff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions video/out/vo_direct3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,7 @@ static mp_image_t *get_window_screenshot(d3d_priv *priv)
return image;

error_exit:
if (image)
talloc_free(image);
talloc_free(image);
if (surface)
IDirect3DSurface9_Release(surface);
return NULL;
Expand Down

0 comments on commit 6e161ff

Please sign in to comment.