I don't know who downvoted you but that's a valid question.
No, if the fund doesn't make money, they don't get performance fee NOR do they have to take 20% of the loss.
Also, the 20% performance fee is applied on the 'Net Gain' and not gross return.
E.g. Going back to my example, if hedge fund made, 10MM on 100MM assets. They will first pay themselves 2MM and charge 20% performance fee on 8MM and not 10MM.
Again, investors are not stupid either, if the hedge fund can't show them gains, they will take their money somewhere else. [Obviously they can still become victim to Madoff like outright fraud.]