diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index d0415a7dc..886288c0d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -631,9 +631,15 @@ void GMainWindow::OnMenuLoadFile() { } void GMainWindow::OnMenuLoadFolder() { - QDir dir = QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory")); + const QString dir_path = + QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory")); - QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files); + if (dir_path.isNull()) { + return; + } + + const QDir dir{dir_path}; + const QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files); if (matching_main.size() == 1) { BootGame(dir.path() + DIR_SEP + matching_main[0]); } else { |