mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-15 23:35:38 +00:00
Fix crash when no files are selected
This commit is contained in:
parent
284536a626
commit
f598490b57
|
@ -1686,12 +1686,12 @@ void GMainWindow::OnCaptureScreenshot() {
|
|||
tr("PNG Image (*.png)"));
|
||||
png_dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||
png_dialog.setDefaultSuffix("png");
|
||||
png_dialog.exec();
|
||||
|
||||
const QString path = png_dialog.selectedFiles().first();
|
||||
if (!path.isEmpty()) {
|
||||
UISettings::values.screenshot_path = QFileInfo(path).path();
|
||||
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path);
|
||||
if (png_dialog.exec()) {
|
||||
const QString path = png_dialog.selectedFiles().first();
|
||||
if (!path.isEmpty()) {
|
||||
UISettings::values.screenshot_path = QFileInfo(path).path();
|
||||
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path);
|
||||
}
|
||||
}
|
||||
OnStartGame();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue