Add missing error check.

Change-Id: I6fcf6d5d50333ff0c205fd87cdb9430f1bc02c43