fix a possible printf(NULL) when -debug is used
Merge pull request #34 from ccaccb/fix_segfault

fix a possible printf(NULL) when -debug is used