XGetWindowProperty doesn't set return property to NULL
when there is an error, so you have to initilize your
pointers to NULL before calling it.
This patch fix frequent crashes caused by calling XFree
on uninitialized pointers in get_utf8_property() &
others functions. Please apply the patch, and, please,
please, give me SVN commit access if possible. lol
BTW, after reading the code, I believe there are some
memory leaks. Sometimes X allocate memory even if
length of returned data is zero, and you didn't check
whether the returned pointer should be freed or not.
Currently I don't have much time to debugging, so fix
important bugs first, since it causes frequent crashes.