Dispose Glfw/Sdl When Checking if Applicable (#2352)