TDI-31013:fix a pb of possiable NPE error.