summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index 2b4be67..de1e8a1 100644
--- a/client.c
+++ b/client.c
@@ -55,7 +55,8 @@ client_init(Window win, struct screen_ctx *sc)
 		return(NULL);
 
 	if (sc == NULL) {
-		sc = screen_find(wattr.root);
+		if ((sc = screen_find(wattr.root)) == NULL)
+			return(NULL);
 		mapped = 1;
 	} else {
 		if (wattr.override_redirect || wattr.map_state != IsViewable)