diff --git a/src/nsterm.m b/src/nsterm.m index bd477a491ff..a6160ed5b2a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4098,6 +4098,9 @@ in certain situations (rapid incoming events). NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "ns_read_socket"); + if (apploopnr > 0) + return -1; /* Already within event loop. */ + #ifdef HAVE_NATIVE_FS check_native_fs (); #endif @@ -4182,6 +4185,9 @@ in certain situations (rapid incoming events). NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "ns_select"); + if (apploopnr > 0) + return -1; /* Already within event loop. */ + #ifdef HAVE_NATIVE_FS check_native_fs (); #endif