Avoid NULL pointer deref. Fixes issue #47.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
4 jobs for master in 7 minutes and 55 seconds (queued for 8 seconds)