I have heard the following sentence in the TV series Marseille:
Il n'y a pas quoi de se branler.
Context: The candidate for mayor of Marseille Barrès have just won the first round of the elections and advanced to the second round with the city's former mayor. When he hears the news, he gets a round of applause from his supporters in his office, but he reacts with the sentence above because the election is not won yet.
What does "n' avoir pas quoi de se branler" mean? "to not get carried away"? How does this meaning relate to the pronominal verb "se branler" (= to masturbate)?