You can make jokes about things that aren't comparatively fresh in people's minds, and consequently painful. I would strongly advise against joking about someone's weight when they're trying to diet; and yet, with other people (Harry Secombe, for instance), it's not a tender subject, so girth jokes are quite appropriate.

It's not safe to joke about the deaths of huge numbers of people, the relatives of whom (well, some of whom at least) are still alive.