Ring: use a better way to fix null point

Change-Id: I698cfb2d66e8294158249745857550917ee2324b