In theory, both sides should be equal, no problem.
Can't you simply use a relative epsilon comparison instead of exact equality here?
I think the underlying problem is closer to…
If an algorithm is sensitive to that level (giving such huge different results caused by such small differences of values), then either this should be documented and accepted as a known…
Not sure what the benefit is though? It might get called from somewhere else with
nullptr
parameters.
Anyways, do you want me to update the patch? Yes please!
Nice spotting!
It should be safe to pass nullptr
in here.
Fix is slightly different, add null-protection around the writes...
ae9ac99d2b
check from 58c54b5859 Might possibly be redundant then? (havent checked though)
Surely this would have caused crashes long ago if the functions were returning NULL, what changed…