A cosmetic agent, containing in a cosmetically acceptable carrier a) at least one copolymer (A) of allyl methacrylate with one or more monomers selected from acrylic acid, methacrylic acid, acrylic acid esters and methacrylic acid esters, b) at least one polymeric quaternary ammonium compound (B) from the group of vinylpyrrolidone copolymers, is provided for temporarily deforming keratinic fibers.