Crash if I minimize application

Hi,
my application crashes if I minimize it (I’m on Windows10). The crash appears in ofAppGLFWWindow::draw() where the currentRenderer->setupScreen(); is called. The the current viewport is called with getCurrentViewport() which returns 0 for viewW and viewH what results in an invalid aspect ratio. Can I do something to avoid the crash?