I was walking with my black friend when suddenly he got shot. Wow, I never felt safer.
Is this a joke about a black person being harmed?
I promise it is just a joke. Nobody was shot.
This joke seems pretty insensitive talking about your black friend being shot. You saying that you felt safer after they got shot also assumes that you felt less safe just because they were there. Might need to be careful with saying things like this as you may seriously offend your friend, whether it is a joke or not.
It's a joke. Calm down.
Joking about one of your friends being killed is pretty messed up. I doubt you are going to get any laughs from black people if you told them this one. Hopefully you understand how this joke may come across to others.