You can never know what it feels like until you've gone through it, and that is not held against you but sometimes a little common sense goes a long way to not stir more uncontrollable, unidentifiable feelings. When someone just found out about a death of a loved one, everything becomes sore, fragile, your words are not as casual anymore and they sure resonate.
The irony is that there is not a lot you can say, but they are things you can simply avoid...and it's not rude for you not to say them...if anything it's the opposite.
What to say is actually replaced by simply being present...Being thoughtful, a hand, an eye contact, a touch and silence! yes, silence...is therapeutic.
Get out of your ways to avoid not understanding, in a deeper sense, what this person is going through at a very time sensitive moment where a lot of your survival instincts, hurt and disbelief are switched on. No one is asking you to awaken emotions but just think through of what feels right to do and say and what doesn't.