Fixed segfault when requesting non-existant parent window