Fixed issue in test code. See below
When trying to call SetActive() on a window, make sure the window IsOpen() first, or else a segfault will occur