[SDL] EXC_BAD_ACCESS on SDL_ConvertSurface Mac OS X

thecommodore6 robwettach at gmail.com
Sat Mar 8 15:23:26 PST 2008




Albert Zeyer wrote:
> 
>>         // Load tiles.bmp into the temp surface, then convert it to
>> the format of
>> gScreen and save it to gTiles, then free the temp surface
>>         SDL_Surface *temp = SDL_LoadBMP("tiles.bmp");
>>         gTiles = SDL_ConvertSurface(temp, gScreen->format,
>> SDL_SWSURFACE);
>>         SDL_FreeSurface(temp);
> 
> 
> At which line do you get this error?
> 
> Is temp != NULL after SDL_LoadBMP ?
> 
> Is gTiles != NULL after SDL_ConvertSurface ?
> 

This error arises on the line gTiles = SDL_ConvertSurface(...); when I try
to step over it in the debugger.

After SDL_LoadBMP, temp == NULL, which to me seems like it could be an
issue, I just don't know how to change that.

I cannot check what gTiles is after SDL_ConvertSurface because the program
freezes at that line and will not continue.

Is the fact that temp == NULL the issue here?  If so, how can I change that?

Thank you, 
-rob
-- 
View this message in context: http://www.nabble.com/EXC_BAD_ACCESS-on-SDL_ConvertSurface-Mac-OS-X-tp15753087p15921887.html
Sent from the SDL mailing list archive at Nabble.com.



More information about the SDL mailing list