toon_root.c: fix handling of XGetWindowPropertymaster
commit5da19a1bca7e9b30d700257a0c57df1543aaf702
authorJames Hogan <james@albanarts.com>
Mon, 29 Oct 2012 04:21:45 +0000 (29 04:21 +0000)
committerJames Hogan <james@albanarts.com>
Mon, 29 Oct 2012 04:38:54 +0000 (29 04:38 +0000)
tree09f3a079e3eaf8342d15cd4d2d35e5ef648626d5
parent6ca27e7579a24aba3017d5d67705c1a1bab74365
toon_root.c: fix handling of XGetWindowProperty

There are a couple of places in toon_root.c where the result from
XGetWindowProperty is assumed to always be written and non-NULL. This
isn't always the case, which causes a seg-fault on some desktops such as
razor-qt, so make sure to always initialise the result to NULL and check
the value before using it.

Reported-by: Jean-Pierre Demailly <Jean-Pierre.Demailly@ujf-grenoble.fr>
Signed-off-by: James Hogan <james@albanarts.com>
src/toon_root.c