Function Func_SafeFreeImage(image)
If image<>0 Then FreeImage image
Return 0
End Function
This would return 0 regardless with the freeimage was successful.
Is this right?
If image<>0 Then FreeImage image
Return 0
End Function
This would return 0 regardless with the freeimage was successful.
Is this right?
Yes, it will always return zero because the safefreeimage WILL ALWAYS be successful. Either the image exists and is freed or the the image doesn't exist(and is thereby already freed).