I'd call this person a
fair weather friend : One who is friendly, helpful, or available only when it is advantageous or convenient to be so.
I'd say:
Okay, you are talking like this because you are a fair weather friend and you feel safe and relieved now, but are you sure it was your last problem?