Merge pull request #6332 from stenzek/frame-dump-crash Renderer: Fix crash on shutdown when frame dumping or taking screenshots