Is there a way to shut the drone down when flying?
For emergency situations. E.g. drone drifting towards the water, trees etc.
No. Fly it carefully and if it starts to drift out of control, just land it. Hopefully, it will be in a good landing spot.
EDIT - Not sure if flying with a remote controller would be different...it may be. If flying with a remote controller, it may be possible to do a Combination Stick Command (CSC) which will kill the motors. If that is the case, the aircraft will just drop out of the sky though...and, you will take your chances as to whether or not the aircraft would survive the impact.