[SDL] Error with SDL at program end

Torsten Giebl wizard at syntheticsw.com
Tue Jul 19 14:59:01 PDT 2005


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





More information about the SDL mailing list