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 <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Alan Coopersmith 2009-12-11 00:46:22 -08:00
commit eb750f8b5e
15 changed files with 58 additions and 17 deletions

View file

@ -64,7 +64,8 @@ Bool
XFixesRegionInit (void)
{
RegionResType = CreateNewResourceType(RegionResFree);
return TRUE;
return (RegionResType != 0);
}
int