Matthew McConaughey talked Jennifer Garner out of quitting 'Dallas Buyers Club'.

Jennifer Garner

Jennifer Garner

The 48-year-old actress was ready to leave the movie because "there was never a 10-minute break" to pump her breast milk and she was missing her kids, but her co-star called for a break in filming, and convinced her to stay.

Garner - who had welcomed her son Samuel, who is now eight, into the world shortly before she accepted the role - said: "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.'

"And sweet Matthew McConaughey pulled me aside and said, 'What is going on with you?' "

After that moment, Garner - who played Dr. Eve Saks in the motion picture - would give McConaughey a sign and then take breaks to pump.

Speaking on 'Tell Me More with Kelly Corrigan', she said: "And from then on, whenever I needed to, I would give him a high sign and I would go take care of it.

"He said, 'You can do both. You’ve got it. You can do it.'

"How much do I love that guy? I know, a lot."

The 2013 movie saw McConaughey play hustler Ron Woodroof, who smuggled unapproved pharmaceutical drugs into Texas to help Aids patients get the medication they needed after he was diagnosed.

In the film, Woodroof was helped by fictional character Rayon, played by Jared Leto.

Garner's comments come after McConaughey recently admitted he almost quit acting to be a wildlife guide or a symphony orchestra conductor.

He said: "I dabbled with thinking about other careers, I dabbled with high school football coach, I dabbled with symphony orchestra leader, I dabbled with wildlife guide, schoolteacher. I was not going back."