Fix crashes when a branch is saved/loaded while the main window is minimized

primarily occurs with the case of a lua script and the user decides to minimize the main window
This commit is contained in:
CasualPokePlayer 2024-04-25 14:12:50 -07:00
parent 24d2794554
commit 3c168ed64c
1 changed files with 4 additions and 2 deletions

View File

@ -741,9 +741,11 @@ namespace BizHawk.Client.Common
if (job.ChainOutsize.Width == 0 || job.ChainOutsize.Height == 0) if (job.ChainOutsize.Width == 0 || job.ChainOutsize.Height == 0)
{ {
// this has to be a NOP, because lots of stuff will malfunction on a 0-sized viewport // this has to be a NOP, because lots of stuff will malfunction on a 0-sized viewport
if (_currentFilterProgram != null)
if (job.Offscreen)
{ {
UpdateSourceDrawingWork(job); //but we still need to do this, because of vsync // for offscreen rendering, OffscreenBb is expected to be non-null
job.OffscreenBb = new(new(1, 1));
} }
return null; return null;