Jennifer Garner might not have been in “Dallas Buyers Club” if it wasn’t for Matthew McConaughey.

The “Peppermint” star revealed in a recent interview that she was prepared to quit after having an emotional breakdown on set.

Garner, 48, had just returned to acting following the birth of her third child Samuel, 8, and took the role in the 2013 drama as a way to make a comeback. 

"So I took it, and that was why," she said on “Tell Me More with Kelly Corrigan." "Because it was time for me to go back to work."

MATTHEW MCCONAUGHEY: 'EMBRACE' RESULTS OF 2020 PRESIDENTIAL ELECTION 'WHICHEVER WAY IT GOES'

The actress went on to reveal that the work environment for “Dallas Buyers Club” was very taxing because they shot the film in 21 days due to McConaughey, 50, and Jared Leto’s extreme weight loss and dieting for their roles.

“There was never a 10-minute break,” the “Peppermint” star said. It became a challenge for her because she wasn’t able to step away to pump breast milk for her son.

Garner recalled, "My boobs were freaking out. It was bedtime, and we were doing some scene that was supposed to be light, and I started crying and I was like, 'I have to quit. I have to go home and be with my kids. I just can’t do this anymore.'”

JENNIFER GARNER SHUTS DOWN PREGNANCY SPECULATION AFTER HALLOWEEN PHOTO RAISES QUESTIONS

Matthew McConaughey stopped Jennifer Garner from quitting 'Dallas Buyers Club.'

Matthew McConaughey stopped Jennifer Garner from quitting 'Dallas Buyers Club.' (Stefanie Keenan/Getty Images)

The mom of three got emotional as she said, “And sweet Matthew McConaughey pulled me aside and said, 'What is going on with you?'" The actor, she explained, paused filming and told the crew Garner needed a break.

"And from then on, whenever I needed to, I would give him a high sign and I would go take care of it," she shared. "He said, 'You can do both. You’ve got it. You can do it.'”

CLICK HERE TO GET THE FOX NEWS APP

Garner added: “How much do I love that guy? I know, a lot.”