EXCLUSIVE

Brandi Glanville has another trick up her sleeve to get the smelly vagina lawsuit thrown out ... she claims Joanna Krupa signed away her right to go after Brandi in court.

In documents obtained by TMZ ... Brandi says Joanna's defamation suit should be tossed, because Joanna's 'Real Housewives' contract forbids her from suing her fellow 'Housewives' cast members.

It would make sense since the heat on those shows comes from the women sniping at each other.

Joanna was on "The Real Housewives of Miami" back in 2013 -- and, in fact, Brandi's vagina comment came on the heels of the 'Miami' reunion show.

Brandi admits she doesn't have a copy of Joanna's contract ... but considering Brandi was on the Bev Hills edition, it's a good bet she knows what's in the fine print.

Krupa's lawyer thinks Brandi's reaching -- trying everything she can and "hope something sticks."