Check return value of wl_cursor functions

This patch adds checks for themes and cursors returned by wl_cursor functions.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
diff --git a/clients/window.c b/clients/window.c
index 4d40e16..5ba7322 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1279,6 +1279,10 @@
 	weston_config_destroy(config);
 
 	display->cursor_theme = wl_cursor_theme_load(theme, size, display->shm);
+	if (!display->cursor_theme) {
+		fprintf(stderr, "could not load theme '%s'\n", theme);
+		return;
+	}
 	free(theme);
 	display->cursors =
 		xmalloc(ARRAY_LENGTH(cursors) * sizeof display->cursors[0]);