Houston Texans running back Darius Anderson was charged with felony burglary of habitation after an incident in Texas last week, court records showed.

Anderson was initially charged with burglary with intent to rape, but Houston police changed the charge on Tuesday. Police said a "coding error" was responsible for the mistaken charge, according to TMZ Sports.

A hearing on the incident is set for Wednesday.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Darius Anderson at minicamp

Houston Texans running back Darius Anderson (30) stretches at minicamp at NRG Stadium. (Thomas Shea-USA TODAY Sports)

"We are aware of the report involving Darius Anderson. We are gathering information and have no further comment at this time," the Texans said in a statement late Monday to Fox News Digital.

Anderson, 24, allegedly broke into the Houston home and pursued a woman into her bathroom, and later the woman called police from the bathroom while Anderson left, according to Pro Football Talk.

The woman told authorities the NFL player "has hit her in the past, but she never made a report before this incident," according to FOX26 Houston. The woman reportedly said the two broke up two months ago, but he's been staying at her house and does not have a key.

Darius Anderson for TCU in 2019

Running back Darius Anderson #6 of the TCU Horned Frogs runs the ball during the first half of the college football game against the Texas Tech Red Raiders on Nov. 16, 2019 at Jones AT&T Stadium in Lubbock, Texas. (John E. Moore III/Getty Images)

HOUSTON TEXANS SETTLE WITH ALL 30 DESHAUN WATSON ACCUSERS

He's now barred from visiting the victim's home and from possessing a firearm. 

He was added to the Texans’ practice squad in December toward the end of the 2021 season. He spent time with the Indianapolis Colts and Dallas Cowboys but never appeared in an NFL game.

Anderson was a standout football player at TCU. He had 768 rushing yards as a sophomore and 598 yards as a junior. In his senior season, Anderson rushed for 823 yards and managed to earn a spot in the Senior Bowl.

Darius Anderson at the Senior Bowl

Running back Darius Anderson #25 from TCU of the North Team during the 2020 Resse's Senior Bowl at Ladd-Peebles Stadium on Jan. 25, 2020 in Mobile, Alabama. The North Team defeated the South Team 34 to 17. (Don Juan Moore/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

He entered the NFL as an undrafted free agent with the Cowboys in 2020.