forked from teamnwah/openmw-tes3coop
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 <SDL_messagebox.h>
|
||||
#include <SDL_main.h>
|
||||
#include <SDL.h>
|
||||
#include "engine.hpp"
|
||||
|
||||
#if defined(_WIN32) && !defined(_CONSOLE)
|
||||
|
@ -282,7 +281,7 @@ int main(int argc, char**argv)
|
|||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
if (isatty(fileno(stdin)))
|
||||
if (isatty(fileno(stdin)) || !SDL_WasInit(SDL_INIT_VIDEO))
|
||||
std::cerr << "\nERROR: " << e.what() << std::endl;
|
||||
else
|
||||
SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), NULL);
|
||||
|
|
Loading…
Reference in a new issue