Fix crash reading an empty clipboard under Wayland

This commit is contained in:
Campbell Barton 2024-01-08 23:32:30 +11:00
parent df43c8e7ef
commit 214f942258

@ -2346,6 +2346,9 @@ static char *read_file_as_buffer(const int fd, const bool nil_terminate, size_t
if (UNLIKELY(len_chunk < 0)) {
ok = false;
}
if (chunk == chunk_first) {
chunk_first = nullptr;
}
free(chunk);
break;
}