Basic obedience commands can prevent this from getting out of control.

Have someone you know she will do this behavior with help in you training her to break the unwanted behavior. Before the behavior starts, put her on a sit or down (I would prefer the down because it is easier to she her getting ready to break). Reward her for the sit or down stay. When she starts to do leg curls put her back in the sit or down immediately. When she does, reward her.

If necessary (if the sit and stay are not solid), have a leash on her and step on the leash as close to her collar as possible to force her into a down. This is what I refer to as puppy management. Keep her in this position as long as necessary when you have company or you can simply crate her or gate her off in a different room. You just want to control the unwanted situation so you are in control and not the dog.