summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-12-11 00:46:22 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-12-18 16:51:45 -0800
commiteb750f8b5e14751d4c40b50499baec5d2ba79db9 (patch)
tree48791902f8ebe6f6422787285accb13d44e25b8a /xfixes
parent1df4bd6011e110dcf0649b15bfffd4ab9e6961d6 (diff)
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>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/cursor.c2
-rw-r--r--xfixes/region.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 60d422296..c3e1e3534 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -1095,6 +1095,6 @@ XFixesCursorInit (void)
}
}
- return CursorClientType && CursorWindowType;
+ return CursorClientType && CursorHideCountType && CursorWindowType;
}
diff --git a/xfixes/region.c b/xfixes/region.c
index 966eda051..59d8cee54 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -64,7 +64,8 @@ Bool
XFixesRegionInit (void)
{
RegionResType = CreateNewResourceType(RegionResFree);
- return TRUE;
+
+ return (RegionResType != 0);
}
int