Blessing in disguise

Something that turns out to be good but which seemed to be bad at first.

My grandmother had a pancreatic tumor and it was a blessing in disguise when she quietly passed away.