is there a way of checking if an image exists, before trying to free it?
freeimage help:)
BlitzPlus Forums/BlitzPlus Programming/freeimage help:) ok i got round it by creating an image before i free them, just in case.
Does this cause a problem anyone know?
Does this cause a problem anyone know?
or shorter:
If handle
blah
Endif
but that's personal style, a valid handle is always>0 .. e.g. 'true'
On a different note, is there a way to check 'what' a handle is?
If a given handle (a function arguement for example) is a correct handle, but a bank, gadget, timer etc. handle, rather than an image handle, and you try to free that with FreeImage.. can't be that good eh ..
/me wants: IsImage(handle), IsBank(handle), IsWindow(handle), IsTimer(handle) etc. etc. Can that be arranged?
If handle
blah
Endif
but that's personal style, a valid handle is always>0 .. e.g. 'true'
On a different note, is there a way to check 'what' a handle is?
If a given handle (a function arguement for example) is a correct handle, but a bank, gadget, timer etc. handle, rather than an image handle, and you try to free that with FreeImage.. can't be that good eh ..
/me wants: IsImage(handle), IsBank(handle), IsWindow(handle), IsTimer(handle) etc. etc. Can that be arranged?
thx peeps, hand to use true instead of <>0 but works just fine
nicoust: have you ever played Dungeon Master, I ask this after seeing your self-classification.