Lose erection when I relax buttocks and thigh muscles

I can’t keep hard without squeezing my buttocks and thighs. And when I relax these muscles I lose my erection. Does it mean I have weak pelvic floor?