He was court-martialed in 2012 on charges of assault on his spouse and on their child. He received a bad conduct discharge, confinement for 12 months and a reduction of his military status.
He was able to purchase an assault rifle despite a law that restricts firearms from people convicted of domestic violence. Under U.S. law, a person who has been convicted of a misdemeanor crime of domestic violence is prohibited from possessing firearms, but it is unclear whether there were exceptions in this case that may have allowed the purchase to go forward.
Kelley purchased the Ruger model AR-556 rifle used in the shooting at a San Antonio sporting goods store in April 2016, according to a law enforcement official.
http://abcnews.go.com/US/texas-church-shooting-racially-religiously-motivated-officials-noting/story?id=50958603
Since a NICS check is mandated by federal law, and there's no evidence to suggest that check was not run as required, then he had no criminal history that would have prohibited the sale at the time the check was run.
Tell me again how "Texas doesn't require checks", will you?