Mischa Barton won't have to worry about a sex tape being leaked by at least one of her exes -- she struck a deal with him, and the judge just signed off on it.
Mischa and her ex-BF, Jon Zacharias, agreed he would NOT release any explicit videos and photos of the 'O.C.' star he obtained during their relationship. Jon must now hand over any material to Mischa's lawyer, Lisa Bloom.
As we reported ... Mischa got 2 temporary restraining orders against Jon and another ex, Adam Spaw. Mischa believed Jon originally captured her in intimate moments without consent, and thinks either Adam or Jon were peddling the material.
Shaw's still barred from releasing material -- under the temporary restraining order. There's a hearing set for Wednesday where Mischa will try to make that one permanent too.