Skip to content

Commit

Permalink
RPI_FreeCursor: set global_cursor to NULL to prevent double-free (bug…
Browse files Browse the repository at this point in the history
… 4769)
  • Loading branch information
sezero committed Aug 26, 2019
1 parent 2cb2618 commit 1e47790
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/raspberry/SDL_rpimouse.c
Expand Up @@ -226,6 +226,9 @@ RPI_FreeCursor(SDL_Cursor * cursor)
SDL_free(cursor->driverdata);
}
SDL_free(cursor);
if (cursor == global_cursor) {
global_cursor = NULL;
}
}
}

Expand Down

0 comments on commit 1e47790

Please sign in to comment.