5 * Sort files to make things prettier
7 - qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
8 + if (files->num != 0) qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
11 * Scan file files to build font patterns
15 size_t old_used = serialize->buckets_used;
16 size_t old_count = serialize->buckets_count;
17 FcSerializeBucket *old_buckets = serialize->buckets;
18 - FcSerializeBucket *old_buckets_end = old_buckets + old_count;
19 + FcSerializeBucket *old_buckets_end = old_count == 0 ? old_buckets : old_buckets + old_count;
21 FcSerializeBucket *new_buckets = malloc (new_count * sizeof (*old_buckets));