mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
(Attempt to) fix duplicate exception dialogs
This commit is contained in:
parent
b6de3645b7
commit
53ccac4b37
@ -49,6 +49,8 @@ namespace Bloxstrap
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private static bool _showingExceptionDialog = false;
|
||||||
|
|
||||||
public static void Terminate(ErrorCode exitCode = ErrorCode.ERROR_SUCCESS)
|
public static void Terminate(ErrorCode exitCode = ErrorCode.ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
if (IsFirstRun)
|
if (IsFirstRun)
|
||||||
@ -85,6 +87,11 @@ namespace Bloxstrap
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
throw exception;
|
throw exception;
|
||||||
#else
|
#else
|
||||||
|
if (_showingExceptionDialog)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_showingExceptionDialog = true;
|
||||||
|
|
||||||
if (!IsQuiet)
|
if (!IsQuiet)
|
||||||
Controls.ShowExceptionDialog(exception);
|
Controls.ShowExceptionDialog(exception);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user