Wiz Khalifa's great defense for blowing off court in Texas Wednesday -- he was hanging out with Megan Fox and Jimmy Fallon on "The Tonight Show."
Sure, Wiz could've kept a low profile -- since there's a warrant out for his arrest -- but instead he popped up as a guest on Fallon's show.
As we reported ... Wiz was supposed to be in court in El Paso Wednesday for his pot bust in May ... but when he didn't show, the judge issued the warrant.
Wiz's next hearing might go something like this: "Your honor. Pictionary. With Megan Fox?!!"
Worth a shot.