Skip to content

Commit

Permalink
Fixed bug 2482 - Wayland_CreateSystemCursor trying to load nonexisten…
Browse files Browse the repository at this point in the history
…t "wait" cursor

Bryan Cain

Wayland_CreateSystemCursor tries to load a cursor named "wait" for two of the system cursor categories.  This causes a segmentation fault when one of these cursors is used, because "wait" is not an actual cursor name in X11/Wayland cursor themes.

I can't attach my patch since I'm on a mobile right now, but I can confirm that simply replacing "wait" with "watch" for both of its uses in Wayland_CreateSystemCursor (in SDL_waylandmouse.c) fixes the bug.
  • Loading branch information
slouken committed Apr 18, 2014
1 parent 7ae52b1 commit 59690a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/wayland/SDL_waylandmouse.c
Expand Up @@ -267,13 +267,13 @@ Wayland_CreateSystemCursor(SDL_SystemCursor id)
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "xterm");
break;
case SDL_SYSTEM_CURSOR_WAIT:
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "watch");
break;
case SDL_SYSTEM_CURSOR_CROSSHAIR:
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
break;
case SDL_SYSTEM_CURSOR_WAITARROW:
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "watch");
break;
case SDL_SYSTEM_CURSOR_SIZENWSE:
cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
Expand Down

0 comments on commit 59690a4

Please sign in to comment.