summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index aaf14f3d9..a8c014235 100644
--- a/file.c
+++ b/file.c
@@ -291,6 +291,9 @@ static void parse_file_buffer(const char *filename, struct memblock *mem, char *
if (fmt && open_by_filename(filename, fmt+1, mem, error))
return;
+ if (!mem->size || !mem->buffer)
+ return;
+
parse_xml_buffer(filename, mem->buffer, mem->size, &dive_table, NULL, error);
}