From eb750f8b5e14751d4c40b50499baec5d2ba79db9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 11 Dec 2009 00:46:22 -0800 Subject: Check for failures from CreateNewResourceType Make sure to check return value before setting bitmask flags. For most calls, just fails to init the extension. Since Xinput already calls FatalError() on initialization failure, so does failure to allocate Xinput's resource type. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard --- Xext/xvdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Xext/xvdisp.c') diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 5229916a9..1f3fc0f3d 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1865,8 +1865,8 @@ void XineramifyXv(void) XvXRTPort = CreateNewResourceType(XineramaDeleteResource); - if(!xvsp0) return; - + if (!xvsp0 || !XvXRTPort) return; + for(i = 0; i < xvsp0->nAdaptors; i++) { refAdapt = xvsp0->pAdaptors + i; -- cgit v1.2.3