[PATCH] window: fix check of cursor image load result
Kristian Høgsberg
hoegsberg at gmail.com
Tue May 8 13:22:50 PDT 2012
On Tue, May 08, 2012 at 10:10:44PM +0200, Rafal Mielniczuk wrote:
Nice catch, thanks.
Kristian
> ---
> clients/window.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/clients/window.c b/clients/window.c
> index b47e969..695fc89 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -665,7 +665,7 @@ create_cursors(struct display *display)
>
> for (i = 0; i < count; i++) {
> images[i] = XcursorLibraryLoadImages(cursors[i], NULL, 32);
> - if (!images) {
> + if (!images[i]) {
> fprintf(stderr, "Error loading cursor: %s\n",
> cursors[i]);
> continue;
> @@ -676,7 +676,7 @@ create_cursors(struct display *display)
> display->cursor_shm_pool = shm_pool_create(display, pool_size);
>
> for (i = 0; i < count; i++) {
> - if (!images)
> + if (!images[i])
> continue;
>
> cursor = &display->cursors[i];
> --
> 1.7.10.1
>
More information about the wayland-devel
mailing list