GUI-Qt: Avoid divide by zero on empty gamelist folder.

This commit is contained in:
refractionpcsx2 2022-07-18 08:47:57 +01:00
parent 395f4e904c
commit 55db243362
1 changed files with 1 additions and 1 deletions

View File

@ -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);