From bffc262c23189ee02c83f62c6180d84e0bae67ff Mon Sep 17 00:00:00 2001 From: "Jeffrey N. Johnson" Date: Sat, 2 Nov 2019 11:16:22 -0700 Subject: [PATCH] Fixes 485 --- radiant/error.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/radiant/error.cpp b/radiant/error.cpp index 736e0b3d..3de216aa 100644 --- a/radiant/error.cpp +++ b/radiant/error.cpp @@ -111,15 +111,24 @@ void Error( const char *error, ... ){ } } - strcat( text, _( "An unrecoverable error has occured.\n" - "Would you like to edit Preferences before exiting Radiant?" ) ); + // If a game has been selected in the global preferences, we can let + // the player edit that game's preferences to try to get it to work. + if (g_PrefsDlg.m_bSetGame) { + strcat( text, _( "An unrecoverable error has occured.\n" + "Would you like to edit Preferences before exiting Radiant?" ) ); - Sys_Printf( text ); + Sys_Printf( text ); - if ( gtk_MessageBox( NULL, text, _( "Error" ), MB_YESNO ) == IDYES ) { - Sys_Printf( "Doing prefs..\n" ); - g_PrefsDlg.LoadPrefs(); - g_PrefsDlg.DoModal(); + if ( gtk_MessageBox( NULL, text, _( "Error" ), MB_YESNO ) == IDYES ) { + Sys_Printf( "Doing prefs..\n" ); + g_PrefsDlg.LoadPrefs(); + g_PrefsDlg.DoModal(); + } + } + else { + strcat( text, _( "An unrecoverable error has occured." ) ); + Sys_Printf( text ); + gtk_MessageBox( NULL, text, _( "Error" ), MB_ICONEXCLAMATION ); } QGL_Shutdown();