window: fix crash in get_client_pid

https://bugzilla.redhat.com/show_bug.cgi?id=1888993
1 job for redhat-1888993 in 5 minutes and 35 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #944717
ubuntu

00:05:35