Fix OSX crash on close window
now if it rendered anything...