diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index 7cf01503d6..a69df22fc1 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -175,8 +175,8 @@ MainWindow::MainWindow(Framework & framework, bool apiOpenGLES3, }; } - auto const width = static_cast(screenshotParams->m_width); - auto const height = static_cast(screenshotParams->m_height); + int const width = m_screenshotMode ? static_cast(screenshotParams->m_width) : 0; + int const height = m_screenshotMode ? static_cast(screenshotParams->m_height) : 0; m_pDrawWidget = new DrawWidget(framework, apiOpenGLES3, std::move(screenshotParams), this); setCentralWidget(m_pDrawWidget);