If people give out poisoned candy at Halloween, then trick-or-treating is dangerous.
People give out poisoned candy at Halloween, therefore trick-or-treating is dangerous.
The inference is valid. If people are handing out poison, don't let your kid take it. However, the fact is unsound. There has never been a single documented case of poisoned Halloween candy.
Hope that helps.