mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-13 17:50:13 +01:00
GUI-Qt: Avoid divide by zero on empty gamelist folder.
This commit is contained in:
1 parent
395f4e904c
commit
55db243362
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user