diff --git a/src/global.c b/src/global.c
index 49633589748bc67ea977c752c28a393a35f05175..1f4139e733b2e90b4fa998e50bfa3d49d44fb1df 100644
--- a/src/global.c
+++ b/src/global.c
@@ -662,7 +662,9 @@ void shortcut_init(bool unjustify)
 
     add_to_funcs(do_exit, MHELP, exit_msg, IFSCHELP(nano_exit_msg), FALSE, VIEW);
 
+#ifndef DISABLE_BROWSER
     add_to_funcs(do_exit, MBROWSER, exit_msg, IFSCHELP(nano_exitbrowser_msg), FALSE, VIEW);
+#endif
 
     /* TRANSLATORS: Try to keep this at most 10 characters. */
     add_to_funcs(do_writeout_void, MMAIN, N_("WriteOut"),