A pistol? Are you kidding?
Against the cat, if you are alone, you're dead. You'll never see him until he's got you. Your only hope is that he goes after your buddy first. Or that your buddy has a gun also. And in that scenario, You're going to have to get off a very lucky shot. I don't care how good you think you are, in a panic situation there's an even chance you would hit your buddy by mistake while they wrestle.
You could empty 2 clips into a bear, and while he might die, it will be a day or two later and well after he's eaten you.