This is definitely true.
I have seen countless people whoa re unemployed pick up the habit of gambling, and this is incredibly damaging to them. First, it gives them something to do during the day, which means that they may no longer be as inclined to look for work. Secondly, it means that financially they are always stuck, as they often pick up debts in order to fund their gambling activities.
As a bare minimum, have some sort of steady income stream before you start gambling. Otherwise you are much more likely to fall into addiction.
Once a person has too much free time they may begin to show behaviors they may not have shown under normal circumstances, losing your job can be a very traumatic experience, since there are many people that take pride on what they do, and being told that you are not necessary and that the company you used to work for does not need your services anymore, can be a very difficult blow to deal with.
So some people may find in their hobbies a way to ease that pain, but if not careful this behavior can easily go out of control and it could have adverse effects on you for years.