Yes, but this only really happens if your lawsuit is bad faith or frivolous. If they have a valid reason for the suit but just lose, this won't happen.