(WHTM) — A Montgomery County, Pennsylvania judge will decide Tuesday if sexual assault charges against Bill Cosby should be dismissed.

Cosby, 78, is charged with aggravated indecent assault for allegedly drugging and sexually assaulting former Temple University employee Andrea Constand at his Montgomery County home in 2004. Cosby says the encounter was consensual.

Constand won a civil case against Cosby. Cosby’s lawyers say he had a deal with former Montgomery County District Attorney Bruce Castor that would prevent his testimony in the civil case from being used against him in a criminal case.

Harrisburg attorney Corky Goldstein has been following the case and says the alleged deal raises some questions.

“There is nothing in writing,” Goldstein said. “In all of my years, whenever there was a side agreement of almost any kind, it is signed by the district attorney and dated and also signed by the attorney for the defendant. So in my mind, I do not know how they will be able to uphold their motion to dismiss based on just Bruce Castor saying there was an agreement.”

Castor will take the stand as Cosby’s witness.

“Castor will be cross-examined as to why there was no written agreement and why nobody else knew about it,” Goldstein said. “Bill Cosby is an older man. His career, his legacy is ruined. Whatever happens in this case is not going to change that.”Get breaking news, weather and traffic on the go. Download the ABC 27 News Appand the ABC 27 Weather App for your phone or tablet.