From b916f5cd8b5157b39c53c0da5f468914a196b2df Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 17 Jan 2010 05:30:22 +0000 Subject: [PATCH] 2010-01-17 Chris Allegretta * nano.c (main), prompt.c (do_statusbar_input): Handle problems with an unmapped function due to key rebinding, fixes crashes on FreeBSD repoted by Eitan Adler . git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/nano.c | 2 +- src/prompt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nano.c b/src/nano.c index e8febbb8..c2e36587 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1626,7 +1626,7 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool #endif iso_me_harder_funcmap(s->scfunc); #ifdef ENABLE_COLOR - if (!f->viewok && openfile->syntax != NULL + if (f && !f->viewok && openfile->syntax != NULL && openfile->syntax->nmultis > 0) { reset_multis(openfile->current, FALSE); } diff --git a/src/prompt.c b/src/prompt.c index 9377ec67..38e89309 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -229,7 +229,7 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *have_shortcut, f = sctofunc((sc *) s); if (s->scfunc != 0 && s->execute == TRUE) { *ran_func = TRUE; - if (!ISSET(VIEW_MODE) || f->viewok) + if (f && (!ISSET(VIEW_MODE) || (f->viewok))) iso_me_harder_funcmap(f->scfunc); } *finished = TRUE; -- 2.39.5