Who Controls 529 Money

If grandma contributed money to a 529 plan and then, after separation/divorce of the parents, withdrew the money prior to the child's 18th birthday, could the child contest the withdrawal in court?