Fix a Segmentation fault in main (copying a NULL value)