Make clients exit orderly when there is no connection
diff --git a/clients/gears.c b/clients/gears.c
index 17536cb..7d3c310 100644
--- a/clients/gears.c
+++ b/clients/gears.c
@@ -413,6 +413,10 @@
 	struct gears *gears;
 
 	d = display_create(&argc, &argv, NULL);
+	if (d == NULL) {
+		fprintf(stderr, "failed to create display: %m\n");
+		return -1;
+	}
 	gears = gears_create(d);
 	display_run(d);