Hello !
> SDL_Surface * ImageLoad(char *file)
> {
> SDL_Surface *temp1, *temp2;
> temp1 = SDL_LoadBMP(file); temp2 = SDL_DisplayFormat(temp1);
> SDL_FreeSurface(temp1);
> return temp2; }
When you are doing it that
way temp2 is freed when the
ImageLoad function exits.
That way when you use it then,
you get an error message.
CU