int actual_format;
unsigned long nitems;
unsigned long bytes_after;
- unsigned char *prop;
+ unsigned char *prop = 0;
int pid;
_NET_WM_PID = XInternAtom(server.dsp, "_NET_WM_PID", True);
int ret = XGetWindowProperty(server.dsp, win, _NET_WM_PID, 0, 1024, False, AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, &prop);
fprintf(stderr, "tint2 : another systray is running");
- if (ret == 0) {
+ if (ret == Success && prop) {
pid = prop[1] * 256;
pid += prop[0];
fprintf(stderr, " pid=%d", pid);