diff --git a/src/interpret.c b/src/interpret.c
index 5c47d1592d44a441305c5e0aef3e5fc3fec51c6f..2d9fafe612ed16cbc0c7fb64884b95eb8b2908b3 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -2114,7 +2114,9 @@ int lower_mega_apply( INT32 args, struct object *o, ptrdiff_t fun )
           function->num_calls++;
           function->recur_depth++;
 #endif
+#ifdef PIKE_USE_MACHINE_CODE
           call_check_threads_etc();
+#endif
 
           if( !constant )
           {