It's true, but subtle and depends on the jurisdiction.
I should add all the qualifiers, IANAL, I don't play one on TV, blah blah. This is Law 101 stuff.
Suing somebody for selling you bad weed should be thrown out because you're committing a crime in buying it.
Why wrongful death could be tried by the family of a burglar against somebody who set up lethal traps in a house....... I have no idea. There's probably a good case with a lengthy judgement about it somewhere... but if you're ever thinking of doing it, in most places it's criminal to set up those kinds of traps.