I consider them friends, so not talking to them anymore is not an option. A pattern is emerging where we meet, small talk for a few minutes and soon after they start talking about their problems. I woudn't mind to help them for a bit, but it feels like problems are the only thing we are talking about.

I'm making fun about them for being just problems, but it's not enough

How can I break this pattern? and how can I avoid it in the first place?