summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-10-22 12:55:34 -0700
committerPhilip Langdale <philipl@overt.org>2022-10-22 12:56:18 -0700
commit395b37b00510502bbedba8afb1772faf404c4876 (patch)
tree35eb07322b85505a249b89b74d1d481be7be4de9
parent42cfed002ff97e62b4d4e623c8e9caecdd389794 (diff)
downloadmpv-395b37b00510502bbedba8afb1772faf404c4876.tar.bz2
mpv-395b37b00510502bbedba8afb1772faf404c4876.tar.xz
vo_gpu/hwdec: add NULL check for legacy_name
-rw-r--r--video/out/gpu/hwdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/hwdec.c b/video/out/gpu/hwdec.c
index 6fe6a69f4f..a2b92ad549 100644
--- a/video/out/gpu/hwdec.c
+++ b/video/out/gpu/hwdec.c
@@ -281,7 +281,7 @@ void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs,
if (strcmp(type, drv->name) == 0) {
load_add_hwdec(ctx, devs, drv, false);
break;
- } else if (strcmp(type, drv->legacy_name) == 0) {
+ } else if (drv->legacy_name && strcmp(type, drv->legacy_name) == 0) {
MP_WARN(ctx, "gpu-hwdec-interop was selected with the legacy name '%s'. "
"Please change it to '%s' in your config file or command line.\n",
drv->legacy_name, drv->name);