Don't access null pointer

Change-Id: If9ac712543f7c7fd85d877bba76e67ce89c60c61
Reviewed-by: Michael Brasser <michael.brasser@live.com>