Superheroes can get away with a lot of things mere mortals cannot. But vaping on a plane is not one of them.

Paul Zimmerman/REX/Shutterstock

According to TMZ, Grant Gustin -- who plays the titular hero on The CW's "The Flash" -- just got busted vaping on a flight from Los Angeles to Vancouver, where his hit show films.

On March 31, Grant -- who was seated in first class -- was flying to Canada from LAX Airport on a Compass Airlines flight with 68 passengers when he felt he needed to relax, sources told TMZ.

Shane Harvey / The CW

When the plane leveled off, the 29-year-old actor headed into the plane's bathroom and started using his vaping pen, TMZ explains. According to witnesses, TMZ writes, "the smoke coming outta the bathroom was so intense, it set off a smoke alarm after seeping into the cockpit ... where the captain and co-pilot were forced to wear oxygen masks."

But there was no drama when Grant was told his behavior was a big no-no: Flight attendants confiscated his vape pen "without incident," TMZ reports.

Getty Images North America

Authorities greeted the "Glee" alum when the plane landed in Vancouver and -- lucky for him -- let him off with just a warning, TMZ further reported.

While Grant's rep didn't get back to TMZ, a Compass Airlines reps told the webloid, the flight "experienced a smoke indicator from the forward lavatory while in flight. A vaping pen was confiscated from a cooperative passenger. The flight landed safely in Vancouver, without delay." The airline did not name the "cooperative passenger."

In January, The CW announced that "The Flash" had been picked up for a sixth season.