prevent core dump

Signed-off-by: Peter <mcheung63@hotmail.com>