This doesn't happen all the time, but I'm getting this error, It sometimes goes away without changing any SDL code but it's always to do with the surface pointer. I set it to nil, then do SDL_SetVideoMode. check to see if it returned -1 and check the pointer which got returned to see if it's nil... it's all good.

Then when I call SDL_flip or SDL_updaterect, it crashes with a SIGSEGV. It doesn't make any sense to me. It was doing it yesterday and then it started working, now it's broke again.

Please, if you know what's going on, point me in the right direction...