mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 11:26:37 +00:00 
			
		
		
		
	Don't try to show exceptions in a message box if SDL was not initialized
This commit is contained in:
		
							parent
							
								
									0c3c3ed8e9
								
							
						
					
					
						commit
						39eea24dc3
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -3,8 +3,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <components/files/configurationmanager.hpp> | #include <components/files/configurationmanager.hpp> | ||||||
| 
 | 
 | ||||||
| #include <SDL_messagebox.h> | #include <SDL.h> | ||||||
| #include <SDL_main.h> |  | ||||||
| #include "engine.hpp" | #include "engine.hpp" | ||||||
| 
 | 
 | ||||||
| #if defined(_WIN32) && !defined(_CONSOLE) | #if defined(_WIN32) && !defined(_CONSOLE) | ||||||
|  | @ -282,7 +281,7 @@ int main(int argc, char**argv) | ||||||
|     } |     } | ||||||
|     catch (std::exception &e) |     catch (std::exception &e) | ||||||
|     { |     { | ||||||
|         if (isatty(fileno(stdin))) |         if (isatty(fileno(stdin)) || !SDL_WasInit(SDL_INIT_VIDEO)) | ||||||
|             std::cerr << "\nERROR: " << e.what() << std::endl; |             std::cerr << "\nERROR: " << e.what() << std::endl; | ||||||
|         else |         else | ||||||
|             SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), NULL); |             SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), NULL); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue