2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Fix crash when no files are selected

This commit is contained in:
xperia64 2019-01-19 22:14:19 -05:00 committed by fearlessTobi
parent 284536a626
commit f598490b57

View file

@ -1686,12 +1686,12 @@ void GMainWindow::OnCaptureScreenshot() {
tr("PNG Image (*.png)")); tr("PNG Image (*.png)"));
png_dialog.setAcceptMode(QFileDialog::AcceptSave); png_dialog.setAcceptMode(QFileDialog::AcceptSave);
png_dialog.setDefaultSuffix("png"); png_dialog.setDefaultSuffix("png");
png_dialog.exec(); if (png_dialog.exec()) {
const QString path = png_dialog.selectedFiles().first();
const QString path = png_dialog.selectedFiles().first(); if (!path.isEmpty()) {
if (!path.isEmpty()) { UISettings::values.screenshot_path = QFileInfo(path).path();
UISettings::values.screenshot_path = QFileInfo(path).path(); render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path);
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); }
} }
OnStartGame(); OnStartGame();
} }