diff --git a/src/syncterm/bbslist.c b/src/syncterm/bbslist.c index 944f7c01f11be9431e7f3d64d7e7adf06df2deff..00a3984a2096e9ce224c67619b9d2a97af39201a 100644 --- a/src/syncterm/bbslist.c +++ b/src/syncterm/bbslist.c @@ -734,14 +734,16 @@ struct bbslist *show_bbslist(int mode) at_settings=!at_settings; break; case -7: /* CTRL-E */ - i=list[opt]->id; - if(edit_list(list[opt],listpath,FALSE)) { - sort_list(list); - for(j=0;list[j]!=NULL && list[j]->name[0];j++) { - if(list[j]->id==i) - opt=j; + if(list[opt]) { + i=list[opt]->id; + if(edit_list(list[opt],listpath,FALSE)) { + sort_list(list); + for(j=0;list[j]!=NULL && list[j]->name[0];j++) { + if(list[j]->id==i) + opt=j; + } + oldopt=-1; } - oldopt=-1; } break; case -6: /* CTRL-D */