Vincent Sorrentino, 31, was seen trying to hide something before walking past the building's security at about 1 p.m., the Sheriff's Office said.
When he passed through security, deputies asked him to remove his shoes. A crack pipe with white residue on it fell out of one of his shoes and broke on the floor, according to authorities. Deputies alleged they found a quantity of crack cocaine in one of the shoes.
Sorrentino was charged with two misdemeanor counts of criminal possession of a controlled substance. He was also arrested on outstanding warrants from Orchard Park and the Village of Hamburg. He was held at the Erie County Holding Center in lieu of $2,500 bail.