Info about surface

Hi,
how can I know if my surface is just free or not?
tnx
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031013/fc281b95/attachment.pgp

Hi,
how can I know if my surface is just free or not?
tnx

I’m pretty sure you can just do this:

if (TheSurface==NULL)
{
//do whatever you would do if that’s the case
}

What do you mean by “free”…?

If you still have a pointer to a surfaces after it’s been passed to
SDL_FreeSurface(), you have an invalid pointer. There is generally no
reliable way of checking for that.

You should make it a habit to “destroy” all pointers to an object
after freeing it, so you don’t accidentally use invalid pointers.
(Anything could happen, so this can be pretty hard to debug!) Always
set pointers to NULL after freeing the object, except possibly when
the pointer is part of an object that’s just about to be destroyed.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Monday 13 October 2003 14.02, NighTiger wrote:

Hi,
how can I know if my surface is just free or not?