coverity#1259904 dereference before null check

Change-Id: If53074b31a821b0764acc9e9f1b0f9d7894e2e5e