summaryrefslogtreecommitdiff
path: root/hw/xquartz
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2010-01-13 14:39:54 -0800
committerJeremy Huddleston <jeremyhu@freedesktop.org>2010-01-13 14:39:54 -0800
commit6f6a99abc12ddee82898fdabfb50c17e90e094b9 (patch)
tree17ef9ce46480f54df117748f3496dff5216f1f40 /hw/xquartz
parent6bde306f7f6b9bbabeaa8bb910ea549be906cd8b (diff)
XQuartz: Don't FatalError in x_hook_run if the list is empty
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Diffstat (limited to 'hw/xquartz')
-rw-r--r--hw/xquartz/xpr/x-hook.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xquartz/xpr/x-hook.c b/hw/xquartz/xpr/x-hook.c
index 03e7f8553..5b850fe88 100644
--- a/hw/xquartz/xpr/x-hook.c
+++ b/hw/xquartz/xpr/x-hook.c
@@ -79,6 +79,9 @@ X_PFX (hook_run) (x_list *lst, void *arg)
void **data;
int length, i;
+ if(!lst)
+ return;
+
length = X_PFX (list_length) (lst);
fun = xalloc (sizeof (x_hook_function *) * length);
data = xalloc (sizeof (void *) * length);