aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 2df9b1d..9ca268a 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -78,6 +78,7 @@
#include "bt-utils.h"
#include "gdbsupport/buildargv.h"
#include "pager.h"
+#include "run-on-main-thread.h"
void (*deprecated_error_begin_hook) (void);
@@ -681,6 +682,9 @@ quit (void)
void
maybe_quit (void)
{
+ if (!is_main_thread ())
+ return;
+
if (sync_quit_force_run)
quit ();