PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

new surface()

Hi,

I found that doing:

Surface *S = new Surface(0,0);

doesn't fail and returns a pointer to the surface. Is this normal behavior? How can we check if the returned surface is valid?

Thanks!

--Eric
GetPixels() will return 0 if the surface is invalid (or there isn't enough memory).