Skip to content
Snippets Groups Projects
Commit 7991dffa authored by deuce's avatar deuce
Browse files

Prevent NULL dereference.

parent 522bd7a7
Branches
Tags
No related merge requests found
...@@ -734,14 +734,16 @@ struct bbslist *show_bbslist(int mode) ...@@ -734,14 +734,16 @@ struct bbslist *show_bbslist(int mode)
at_settings=!at_settings; at_settings=!at_settings;
break; break;
case -7: /* CTRL-E */ case -7: /* CTRL-E */
i=list[opt]->id; if(list[opt]) {
if(edit_list(list[opt],listpath,FALSE)) { i=list[opt]->id;
sort_list(list); if(edit_list(list[opt],listpath,FALSE)) {
for(j=0;list[j]!=NULL && list[j]->name[0];j++) { sort_list(list);
if(list[j]->id==i) for(j=0;list[j]!=NULL && list[j]->name[0];j++) {
opt=j; if(list[j]->id==i)
opt=j;
}
oldopt=-1;
} }
oldopt=-1;
} }
break; break;
case -6: /* CTRL-D */ case -6: /* CTRL-D */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment