avoid crash on null temp_window, thanks Phillip Kutin!