CNN analyst used Daniel Pearl's 2002 death to slam Obama. He was a state senator then.

Twitter

It's always a good idea to check your facts before you try to badmouth someone. 

On Monday evening, CNN analyst Kayleigh McEnany slammed former president Barack Obama for golfing after the beheading of Wall Street Journal reporter Daniel Pearl

"You had President Obama, who after I believe it was the beheading of Daniel Pearl, spoke to how upset he was about that, then rushed off to a golf game," she said. "I think when we're in a state of war, when we're in a state of mourning, you should take time off from golfing."

One problem: Pearl was killed in February 2002, while Obama was still a state senator in Illinois

McEnany's criticism of Obama comes only days after Trump spent his 12th time on the green after nine weeks in the White House. Trump infamously criticized the president multiple times for playing golf, as well. 

Taxpayers paid about $12 million a year for Obama's golfing trips, while Trump's trips cost $10 million in the first 30 days of his presidency alone. 

This isn't the first time Obama has played punching bag for something he flat out did not do. 

In August, Trump spokeswoman Katrina Pierson blamed Obama for the death of U.S. Army Captain Humayan Khan in 2004. At the time, Obama was — you guessed it — a state senator in Illinois, and against the war. 

After the clip began to go viral, McEnany addressed the gaffe in a tweet sent out Tuesday morning. She also mentioned James Foley, who was killed in 2014 by the Islamic State. 

"I apologize for using the wrong name," McEnany said. "Both James Foley and Daniel Pearl lost their lives to terrorism and should be honored by our leaders." 

Mar. 28, 2017, 9:42 a.m.: This story has been updated.