Quote:Original post by dudedbz1
I'm pretty sure m_Screen isnt null, or else my above code snippet's "ret" would be false and the program would quit before the flip...
Oh ok, so in your cApp_InitWindow function, you have something like this:
m_Screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, bpp, flags)
Also just noting you pass in the heigth then the width 1st in your code, is your function handling that properly. Other than that, only reason I could see it crash is with an invalid surface, what do all your functions look like: cApp_Init, cApp_InitWindow, and cApp_AddImage. Also you might want to try not putting all of those in that one line, break it up to make sure things are getting called in the right order:
int error = 0;
error += app.cApp_Init(SDL_INIT_VIDEO);
error += app.cApp_InitWindow(SCREEN_H, SCREEN_W, SDL_HWSURFACE | SDL_DOUBLEBUF);
error += app.cApp_AddImage("Paddle.bmp");
error += app.cApp_AddImage("Paddle.bmp");
error += app.cApp_AddImage("Ball.bmp");
Now if error > 0, then one of them failed (assuming your return 0 on no error and 1 on error), and you are sure they all got called in the right order.