From 55db2433627e892f9657dfd1ec7cde84c8b271dc Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Mon, 18 Jul 2022 08:47:57 +0100 Subject: [PATCH] GUI-Qt: Avoid divide by zero on empty gamelist folder. --- pcsx2-qt/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 13cb935010..976f57e521 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -822,7 +822,7 @@ void MainWindow::updateWindowState(bool force_visible) void MainWindow::setProgressBar(int current, int total) { - const int value = (current * 100) / total; + const int value = (total != 0) ? ((current * 100) / total) : 0; if (m_status_progress_widget->value() != value) m_status_progress_widget->setValue(value);