Avoid using &d->data[0] when d->data is empty.