A Dallas police affidavit released Thursday says officials found marijuana in a man's apartment where he was allegedly shot by an off-duty police officer, but a lawyer for the victim's family says the search shows that police are attempting to discredit him.

Dallas police officer Amber Guyger has been charged with manslaughter in the death of Botham Jean, a black man she is accused of shooting in his apartment last week. Guyger reportedly believed that she was in her own apartment and that Jean was a burglar.

Police recovered 10.4 grams — or .37 ounces — of marijuana in a search of Jean's apartment, according to a police affidavit.

The search "highlights just sort of the nefarious nature of their investigation," said Lee Merritt, an attorney for Jean's family. Merritt learned of the latest search warrant details shortly after Jean's funeral Thursday.

"They went in with the intent to look for some sort of criminal justification for the victim," Merritt said. "It's a pattern that we've seen before ... we have a cop who clearly did something wrong. And instead of investigating the homicide — instead of going into her apartment and seeing what they can find, instead of collecting evidence relevant for the homicide investigation — they went out specifically looking for ways to tarnish the image of this young man."

Some on social media expressed similar opinions: "Hours after a stranger shot #BothamJean IN HIS APARTMENT, police got a search warrant to search HIS APARTMENT," tweeted social activist Shaun King.

"They began their investigation into HIS MURDER by searching through HIS belongings."

Also found in the search, according to a search warrant affidavit: two bullet casings, a police backpack, a lunch box, laptop computer, metal marijuana grinder, two electronic keys and two used packages of medical aid.

Dallas police conducted the search before turning the investigation over to the Texas Rangers.

Police documents have presented differing accounts of the events leading up to the shooting. One account says a conflict started at the door of Jean's apartment. Another account says Guyger entered the apartment through an ajar door, thinking it was her own. In that account, Guyger saw the silhouette of a person she believed to be a burglar from across the room.

Jean worked for PricewaterhouseCoopers in Dallas and had a reputation for volunteerism and charity work.

"Our prince royal was snatched from us by the quick-to-trigger finger of one trained to protect and serve," Jean's uncle, Ignatius Jean, said at a Thursday funeral.