fix null pointer exception

Signed-off-by: Hiroshi Miura <miurahr@linux.com>