You may have heard the warning that sitting is the new smoking in terms of heart health. Now, it turns out that not all sitting is created equal: According to a new study, sitting at work is healthier for you than kicking back in front of the television.

The study, which a team from the University of Central Florida published in the Journal of the American Heart Association, focused on African-American subjects because of the high rate of cardiovascular disease in that population.

The group that spent more than four hours sitting in front of the TV were 49% more likely to die or experience a cardiovascular attack than those who watched two hours or less.

It tracked the television viewing and work habits of 3,592 subjects in Jackson, Mississippi, for an average of 8.4 years between 2002 and 2012. During that time, 129 of the subjects suffered cardiovascular events (including heart attacks and strokes), and 205 died.

The group that spent more than four hours sitting in front of the TV (mostly in the evening) were 49% more likely to die or experience a cardiovascular attack than those who watched two hours or less.

By contrast, subjects who reported they spent most or all of their time at work sitting ran no higher risk than participants who weren’t seated at work.

Exercise reversed those gloomy numbers for the TV-watchers: Those who got the World Health Organization’s recommended 150 minutes per week of moderate exercise were able to neutralize the negative effects of television sitting.

Other factors might be at play here. Lin Yang, a researcher at the University of Calgary in Canada who wasn’t involved in the study, suggested to Reuters that people may be more likely to snack while watching television than in the office.

What’s more, the biggest consumers of TV were more likely than average to be inactive, overweight, smokers, heavy drinkers, unhealthy eaters and to have an annual household income below $50,000.

Those who spent a lot of time in office chairs were more likely to be young women. While they tended to be overweight, they generally had high levels of leisure-time physical activity, a high-school diploma, a healthier diet, and a family income above $50,000.

Bottom line for heart health: If you’re glued to the tube, make sure you compensate with moderate exercise — and ease up on the TV snacks.