src/dfxml.c: fix check for filename

This commit is contained in:
Christophe Grenier 2013-11-01 12:03:37 +01:00
parent f9abcbb71b
commit 86308a25e1

View file

@ -307,7 +307,7 @@ void xml_log_file_recovered(const file_recovery_t *file_recovery)
uint64_t file_size=0;
if(xml_handle==NULL)
return;
if(file_recovery->filename==NULL)
if(file_recovery==NULL || file_recovery->filename[0]=='\0')
return;
xml_push("fileobject", "");
xml_out2s("filename", relative_name(file_recovery->filename));
@ -366,7 +366,7 @@ void xml_log_file_recovered2(const alloc_data_t *space, const file_recovery_t *f
{
if(xml_handle==NULL)
return;
if(file_recovery->filename==NULL)
if(file_recovery==NULL || file_recovery->filename[0]=='\0')
return;
xml_push("fileobject", "");
xml_out2s("filename", relative_name(file_recovery->filename));