check for NULL to fix segfault
1 file changed