I think it is fine to turn to hobbies to take ur mind off or
detached urself from upsetting matters but once u get addictive or
attached urself to these things, then u r creating suffering for
urself.
To prevent it, .. is be mindful of it. There is a difference
between people who live their life mindful and non-mindfully.
Mindful people are aware of what is not beneficial for them and
thus before it arises/happens, they stopped doing those thing, thus
stopping addiction. Without even being mindful of what is going on
and knowing what is non-benefical and benefical, u r like a lost
sheep and unaware of where u are going.