Fixed a crash caused by closing a window that has been minimized with the box, when trying to open the box it would crash since the window would not exist any longer