Bg 17.22

adeśa-kāle yad dānam
apātrebhyaś ca dīyate
asat-kṛtam avajñātaṁ
tat tāmasam udāhṛtam
Synonyms: 
adeśa — at an unpurified place; kāle — and unpurified time; yat — that which; dānam — charity; apātrebhyaḥ — to unworthy persons; ca — also; dīyate — is given; asat-kṛtam — without respect; avajñātam — without proper attention; tat — that; tāmasam — in the mode of darkness; udāhṛtam — is said to be.
Translation: 
And charity performed at an impure place, at an improper time, to unworthy persons, or without proper attention and respect is said to be in the mode of ignorance.
Purport: 

Contributions for indulgence in intoxication and gambling are not encouraged here. That sort of contribution is in the mode of ignorance. Such charity is not beneficial; rather, sinful persons are encouraged. Similarly, if a person gives charity to a suitable person but without respect and without attention, that sort of charity is also said to be in the mode of darkness.