Skip to content

Commit

Permalink
GUI-Qt: Avoid divide by zero on empty gamelist folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Jul 18, 2022
1 parent 395f4e9 commit 55db243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcsx2-qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 55db243

Please sign in to comment.