mirror of https://github.com/MidnightCommander/mc
Fix segfault in directory hotlist.
(listbox_get_current): check parameter value before use it's member. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
d26b7dd6ee
commit
62e1606106
|
@ -656,10 +656,11 @@ listbox_select_entry (WListbox * l, int dest)
|
|||
void
|
||||
listbox_get_current (WListbox * l, char **string, void **extra)
|
||||
{
|
||||
WLEntry *e;
|
||||
WLEntry *e = NULL;
|
||||
gboolean ok;
|
||||
|
||||
e = listbox_get_nth_item (l, l->pos);
|
||||
if (l != NULL)
|
||||
e = listbox_get_nth_item (l, l->pos);
|
||||
|
||||
ok = (e != NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue