Ring: fix null point.

Change-Id: Ia646531f2dc0354061a5693a416f5dbb7cf09ff1