Glass barrier for swimming pool with safety lock