Qt: Add missing event type check

This commit is contained in:
Stenzek
2025-07-17 19:40:45 +10:00
parent da6ba416c9
commit 2aaeaf6f99

View File

@@ -2648,7 +2648,8 @@ void MainWindow::closeEvent(QCloseEvent* event)
void MainWindow::changeEvent(QEvent* event)
{
if (static_cast<QWindowStateChangeEvent*>(event)->oldState() & Qt::WindowMinimized)
if (event->type() == QEvent::WindowStateChange &&
static_cast<QWindowStateChangeEvent*>(event)->oldState() & Qt::WindowMinimized)
{
// TODO: This should check the render-to-main option.
if (m_display_widget)