While I know that there are cases of people being harrased by homeless people, I think many times a simple gesture like yours can mean all of the difference.
I don't like giving money to people bumming it on the streets ( mostly because I never have cash on me ) but usually try to offer to buy them a sandwich or a coffee or something along those lines.