diff --git a/ChangeLog b/ChangeLog
index 92daa0527e33421cd269258b37e9e572c00656d6..9967b4fa6e5a0993858e242ce97b0a8460ec63db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2014-04-05  Mike Frysinger  <vapier@gentoo.org>
+	* src/nano.c (do_input): Reload possibly freed function pointer.
+
 2014-04-04  Benno Schulenberg  <bensberg@justemail.net>
 	* src/{files.c,nano.c}: Avoid two more compilation warnings.
 	* configure.ac: Allow --enable-extra and --enable-multibuffer
diff --git a/src/nano.c b/src/nano.c
index 00ccbf58f43c715aede9636e91446ecca229cde0..a40a01a6fced77bde1664e50f09f073543b2cb01 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1675,6 +1675,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
 #endif
 				s->scfunc();
 #ifndef DISABLE_COLOR
+				/* The command might have re-initialized shortcuts,
+				 * in which case f is now invalid.  Let's reload it. */
+				f = sctofunc((sc *) s);
 				if (f && !f->viewok && openfile->syntax != NULL
 					&& openfile->syntax->nmultis > 0) {
 				    reset_multis(openfile->current, FALSE);