It's just a dream.
You probably did
I'm sorry to hear that your friend had this dream. Dreams related to deceased people can often be distressing and traumatic. Some people believe that dreams mean nothing (although Freud would certainly be turning in his grave at the assumption) but there is certainly a spiritual aspect to consider when it comes to these types of dreams.
It is often said that when one dreams of a deceased person, that person's soul has yet to leave. This is often the case if the person who has passed has left prematurely and so their soul finds it harder to depart.
If this is the case, they can sometimes be recipients to your energy and enter your dreams. It is often said, in the spiritual dimension, in order to help them move on you must give up calling them back in your daily thoughts.
This is however just a spiritual take on dreams. Some people choose not to look at this way, and summarise dreams as just an unconscious illusion.
Alternatively, thinking about a person over and over again means that it is likely that they will appear in your dreams since your mind is focused on the subject.
I hope this helps.