Skip to content

Commit

Permalink
Add some SDL_SetError() calls to the dollar gesture code (thanks, Mar…
Browse files Browse the repository at this point in the history
…tin!).

Fixes Bugzilla #2673.
  • Loading branch information
icculus committed Apr 5, 2015
1 parent 0713c1e commit 05a9206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/SDL_gesture.c
Expand Up @@ -184,7 +184,7 @@ static int SDL_AddDollarGesture(SDL_GestureTouch* inTouch, SDL_FloatPoint* path)
int index = -1;
int i = 0;
if (inTouch == NULL) {
if (SDL_numGestureTouches == 0) return -1;
if (SDL_numGestureTouches == 0) return SDL_SetError("no gesture touch devices registered");
for (i = 0; i < SDL_numGestureTouches; i++) {
inTouch = &SDL_gestureTouch[i];
index = SDL_AddDollarGesture_one(inTouch, path);
Expand All @@ -206,7 +206,7 @@ int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src)
for (i = 0; i < SDL_numGestureTouches; i++)
if (SDL_gestureTouch[i].id == touchId)
touch = &SDL_gestureTouch[i];
if (touch == NULL) return -1;
if (touch == NULL) return SDL_SetError("given touch id not found");
}

while (1) {
Expand Down

0 comments on commit 05a9206

Please sign in to comment.