x and y are within bounds. If I use them to get the color value of the pixel, no problem. And even if I check that the pixel isn't null, the program always just exits when I get to the SDL_GetRGBA call.