Expected Behavior
shareSoundToTarget shouldn't crash when you call it with a null target. It already checks whether target exists before adding the sound, but not before accessing other properties on the target (i.e. sprite) See the following line of code:
https://github.com/LLK/scratch-vm/blob/develop/src/virtual-machine.js#L1240
Noticed this when trying to debug reordering of sounds crash fixed in the PR below. We shouldn't have been calling into this code, but we could be more resilient (as the costumes are) scratchfoundation/scratch-gui#4389