This is probably a stupid question, but when using the C API, is it safe to pass a null pointer to functions that expect an object, or do I have to check the pointer’s value before calling the function?
My current code does the following:
…but I’m not sure if that’s entirely safe (pImpl->Channel may be null if the music object has never been played). I haven’t had FMOD crash yet by passing a null parameter, but that just may be dumb luck. I want to make sure.
- Bruce asked 11 years ago
- You must login to post comments