summaryrefslogtreecommitdiffstats
path: root/video/out/vo_direct3d.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-18 23:34:31 +0100
committerDudemanguy <random342@airmail.cc>2023-11-18 23:55:28 +0000
commit6e161ff13fb83be9c5180e99427651975d33debf (patch)
treeb4c00ce446129f716b0810151f1076a9de62febf /video/out/vo_direct3d.c
parent4d8c0744317801c34f823b9974f4e2f4c6fc7231 (diff)
downloadmpv-6e161ff13fb83be9c5180e99427651975d33debf.tar.bz2
mpv-6e161ff13fb83be9c5180e99427651975d33debf.tar.xz
vo_direct3d: remove redundant condition
talloc_free is safe to call with NULL.
Diffstat (limited to 'video/out/vo_direct3d.c')
-rw-r--r--video/out/vo_direct3d.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index af17b4cf59..16936bbe10 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -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;