Now, I can run my game and stuff and it works fine. But when I quit, this screws everything up. If I don't call this function, the program exits fine. However, I'm supposed to release the surfaces' resources, right? Anyway, I'm pretty sure there is nothing wrong with the actual function, so is there some way I could have screwed this up in a previous function, like initializes it wrong or something? Thanks for any help.