If it was me I would size up the situration. Is the person fooling around, if they are I would tell them thats not cool and what were you thinking, and then listen to their reply.
If they seriously tried to take my weapon I would do two things. One, I would drive my fingers into there eyes and strike them in the adams apple trying to kill them. If for some reason that didn't work or there were more attackers, Two I would pull my pocket pistol out and shoot them in the head. Then I would call the cops and my lawyer, and wife, and wait for the cops, and use my phone camera to take video of the witnesses using the Quik app.
I don't know if this is the proper way to handle it, but hopefully someone here will correct if i'm wrong.
Now that I think of it, I only had one occasion where someone kept going to my gun side and acted like he may take my gun, he was talking crazy about wanting a gun to kill someone. It was at Cal Anderson Park a week before the aclu was having a annaverery party there. The person was that indian guy Williams that was shot by the police a couple of weeks later. He made me so nearvous I had to walk away from him.