summaryrefslogtreecommitdiff
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:45:02 -0800
commit3f75966023f4cf3510ca68eee412ef312879d013 (patch)
tree87a5f7b0237089a76fb615dc694e8f6ca1be97eb
parent27a5b8f6cd1868dbb3fca49ff12eda7b14d0eb5f (diff)
XQuartz: Don't FatalError in x_hook_run if the list is empty
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> (cherry picked from commit 6f6a99abc12ddee82898fdabfb50c17e90e094b9)
-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);