"Finishing her homework, she went for a walk."

Someone pointed out that it's wrong and says it should be "having finished".

I don't see what's wrong with it.