Fix #3874: Crash at shutdown in TextureBrowser::destroyWindow()