Crashing problem - bug fix

Hi,

found it in “src/video/SDL_blit.c”

Function: SDL_SoftBlit()
Line: 121


/* We need to unlock the surfaces if they’re locked */
if ( dst_locked ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
video->UnlockHWSurface(this, dst);
} else <------------------- this else shouldn’t be here
if ( src_locked ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
video->UnlockHWSurface(this, src);
}

not unlocking the src surface if the destination surface is locked.
This leaves surface->pixels pointing to the hardware surface instead
of being NULL,

cheers,
John.

found it in “src/video/SDL_blit.c”

Function: SDL_SoftBlit()

/* We need to unlock the surfaces if they’re locked */
if ( dst_locked ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
video->UnlockHWSurface(this, dst);
} else <------------------- this else shouldn’t be here
if ( src_locked ) {
SDL_VideoDevice *video = current_video;
SDL_VideoDevice *this = current_video;
video->UnlockHWSurface(this, src);
}

Thanks, this fix is now in CVS.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment