Gary Oldman appeared on “The Drew Barrymore Show” this week and expressed gratitude for the “Harry Potter” and “Batman” film franchises for saving him, both in his career and his personal life. Acting jobs were drying up for Oldman before he got cast as Sirius Black and James “Jim” Gordon — two roles that made him a fan favorite among genre fans and gave his career the star power it never had before.

“At 42 years old, I woke up divorced and I had custody of [my] boys,” Oldman said. “That, in itself, was… that was hard because there was a shift in the industry where a lot of productions were being [filmed in] Hungary, Budapest, Prague, Australia, you know, all of these places. So, I turned down a lot of work.”

“Thank God for ‘Harry Potter,’” he said. “Thank God for ‘Harry Potter.’ I tell you, the two — ‘Batman’ and ‘Harry Potter’ — really, they saved me, because it meant that I could do the least amount of work for the most amount of money and then be home with the kids.”

Popular on Variety

While filming Christopher Nolan’s first Batman movie, 2005’s “Batman Begins,” Oldman repeatedly flew back and forth from his home in Los Angeles to the movie’s London set in order to continue raising his children after his divorce.

“When we did the first Batman..London doubled for Gotham. I did 27 round trips of flying back from LA,” Oldman said. “I’d fly in for a day. I’d do a shoot a day. To Chris Nolan’s credit.. he stayed on schedule. I would go home for three days. Come back for two. Go home for a weekend. Come back for a day… otherwise, I just felt my kids are being brought up by a nanny.”

Oldman has two sons with Donya Fiorentino, whom he was married to from 1997 to 2001. During the pair’s divorce, Oldman was accused of domestic assault. A judge then gave Oldman custody of their two sons after dismissing Fiorentino’s abuse claims. The allegations resurfaced in 2018 amid Oldman’s Oscar win for best actor (“Darkest Hour”) after Fiorentino congratulated the Academy for honoring an abuser. Oldman’s son Gulliver published an open letter defending his father.

“It has been troubling and painful to see these false allegations against my father being written about again, especially after this was all settled years ago,” Gulliver wrote. “There is good reason that these specific articles and accusations subsided years ago.”

Gulliver called Oldman his “one and true guiding light” and “only hero,” adding that he was “granted the good graces” to be raised by only his father.

Watch Oldman’s full appearance on “The Drew Barrymore Show” in the video below.