### Godot version

 Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

![image](https://user-images.githubusercontent.com/85438892/214476911-0ce83a43-b959-4b13-88fd-d6b9af0cd63a.png)

### Steps to reproduce

Open any script

### Minimal reproduction project

N/A
Atom actual_type = None;
	int actual_format = 0;
	unsigned long nitems = 0;
	unsigned long bytes_after = 0;
	unsigned char *ret = nullptr;
	
	if (p_property != None) {
		int read_bytes = 1024;
		do {
			if (ret != nullptr) {
				XFree(ret);
			}
			XGetWindowProperty(p_display, p_window, p_property, 0, read_bytes, False, AnyPropertyType,
					&actual_type, &actual_format, &nitems, &bytes_after,
					&ret);
			read_bytes *= 2;
		} while (bytes_after != 0);
	}
	Property p = { ret, actual_format, (int)nitems, actual_type };
	return p;
}
static Atom pick_target_from_list(Display *p_display, const Atom *p_list, int p_count) {