You're company doesn't have to be right to sue you and they usually have deeper pockets. Who's to say if the work was done before or after work hours. If you worked at a network company and then at home "invented" some network device, your employer would have a good chance at winning a suit regardless of merit.

Very true. Unfortunately this is a reality of most legal systems. It's hard to fight against those with more money, even if you are in the right. Hopefully the onus is on the employer to prove you created it during work hours, either way it's still a very difficult situation to be in.