mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Fix crash when no files are selected
This commit is contained in:
		
							parent
							
								
									82acde7e4b
								
							
						
					
					
						commit
						c6d623f4ba
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -1565,13 +1565,13 @@ 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(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue