Free locked hardware surfaces?

I was glancing over the SDL code, and wondered if SDL_FreeSurface on a
locked hardware surface would cause problems. I didn’t look all the
hardware backends, but it seems like this might be a problem?

Warning, this is a totally untested patch for a totally unconfirmed problem.

If someone has a little more knowledge about these and can verify a
problem; then I’m pretty confident this little 2 liner will fix things.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: free_lock_surface.patch
Type: text/x-patch
Size: 417 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040629/1eefb92a/attachment.bin

I was glancing over the SDL code, and wondered if SDL_FreeSurface on a
locked hardware surface would cause problems. I didn’t look all the
hardware backends, but it seems like this might be a problem?

You’re not supposed to free locked surfaces, but it’s a legitimate point.
I’ve applied a slightly more robust solution to CVS.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment