"Night Court" star Harry Anderson died of a stroke he apparently suffered in the night, which might've been triggered by the flu and a specific type of heart disease.

TMZ has obtained Anderson's

, which lists the actor's primary cause of death as cardioembolic cerebrovascular accident, which is a stroke that's caused by the heart pumping unwanted materials into the brain's circulation.

The contributing causes are listed as influenza -- the flu -- and a heart disease that affects the tissue of the organ by either enlarging it or disrupting its natural motor function.

As we reported ... Anderson was found dead on arrival last week after his wife called 911. She told the operator that his body was cold, and that CPR wouldn't help. She also mentioned he'd suffered a series of strokes earlier this year.