From adcf95b8b5801c15ee84d69e86a7f465adad2d98 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 16 Apr 2025 18:15:40 +0200 Subject: [PATCH] (!1916) Xv: fix segfault on shutdown Protect against adaptor having NULL port list in XvStopAdaptors() Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/xvmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 818452998..88bf98ff3 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -351,7 +351,7 @@ XvStopAdaptors(DrawablePtr pDrawable) XvPortPtr pp = pa->pPorts; int np = pa->nPorts; - while (np--) { + while ((np--) && (pp)) { if (pp->pDraw == pDrawable) { XvdiSendVideoNotify(pp, pDrawable, XvPreempted);