fix null pointer

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>