On Wed May 14 15:37:11 2025 +0000, Nikolay Sivov wrote:
Just use FAILED(hr), or don't test for NULL argument case at all.
If you're going to use FAILED(hr) we might as well scrap the test, there's little to no way the function would succeed with an invalid pointer if not outright crash.
@maljaf, you probably added the test because the app depends on it, right? Otherwise we could just remove the NULL check entirely in implementation side and let it crash. Maybe not if that makes the API inconsistent with other ones.