issue #21357 check to see if window has parent before xtsettingsSetValue...

... call