Release a surface after directly accessing the pixels.
void SDL_UnlockSurface(SDL_Surface * surface);
This function is available since SDL 2.0.0.
CategoryAPI