that was something I thought I heard in this video. I was wrong. I thought the whistle had blown before he had the ball.
https://www.youtube.com/watch?v=dQ9dO-gqHP4
https://www.youtube.com/watch?v=EDe9GPhSrgE
It looks like the Magic player has the ball at the exact same time of the first whistle, hard to tell exactly when. So inadvertent whistle, Magic keep the ball, and had he scored the basket it would not have counted.