diff options
| author | 2019-01-19 22:14:19 -0500 | |
|---|---|---|
| committer | 2019-02-05 22:40:23 +0100 | |
| commit | f598490b57163680b0029bcb8f0077012b962498 (patch) | |
| tree | 8ea68964e1f08810f4070d0799e658172ee5bda6 /src | |
| parent | Add file extension to screenshot filename if not provided (diff) | |
| download | yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.gz yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.xz yuzu-f598490b57163680b0029bcb8f0077012b962498.zip | |
Fix crash when no files are selected
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3a105dc4f..485e29de2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1686,12 +1686,12 @@ void GMainWindow::OnCaptureScreenshot() { | |||
| 1686 | tr("PNG Image (*.png)")); | 1686 | tr("PNG Image (*.png)")); |
| 1687 | png_dialog.setAcceptMode(QFileDialog::AcceptSave); | 1687 | png_dialog.setAcceptMode(QFileDialog::AcceptSave); |
| 1688 | png_dialog.setDefaultSuffix("png"); | 1688 | png_dialog.setDefaultSuffix("png"); |
| 1689 | png_dialog.exec(); | 1689 | if (png_dialog.exec()) { |
| 1690 | 1690 | const QString path = png_dialog.selectedFiles().first(); | |
| 1691 | const QString path = png_dialog.selectedFiles().first(); | 1691 | if (!path.isEmpty()) { |
| 1692 | if (!path.isEmpty()) { | 1692 | UISettings::values.screenshot_path = QFileInfo(path).path(); |
| 1693 | UISettings::values.screenshot_path = QFileInfo(path).path(); | 1693 | render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); |
| 1694 | render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); | 1694 | } |
| 1695 | } | 1695 | } |
| 1696 | OnStartGame(); | 1696 | OnStartGame(); |
| 1697 | } | 1697 | } |