[SDL] windows funnyness

Ryan C. Gordon icculus at clutteredmind.org
Tue Aug 7 09:30:00 PDT 2001


> SDL_Surface *load_and_format_bmp(char *fileName)
> {
> 	SDL_Surface *tmp, *surface;
>
> 	/* Load the BMP file into a surface */
> 	tmp = SDL_LoadBMP(fileName);
> 	if (tmp == NULL) {
> 		fprintf(stderr, "Could'nt load %s: %s\n", fileName, SDL_GetError());
> 		return;
> 	}
> [...]
>

That "return" without a value in the "if (tmp == NULL)" block is the
problem. It's not returning a value.

--ryan.







More information about the SDL mailing list