Fix rename detection.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 7af50f9..40c7e10 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1429,7 +1429,8 @@ static void save_audio_file_info(HASH_TYPE *hash, const char *path,
        pos += afhi_size;
        PARA_DEBUG_LOG("size: %zu, chunks start at %d\n", size, pos);
        write_u16(buf + AFTROW_CHUNKS_OFFSET_POS, pos);
-       save_chunk_table(afhi, buf + pos);
+       if (afhi)
+               save_chunk_table(afhi, buf + pos);
        PARA_DEBUG_LOG("last byte in buf: %p\n", buf + size - 1);
        obj->data = buf;
        obj->size = size;