mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
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
|
void
|
||||||
listbox_get_current (WListbox * l, char **string, void **extra)
|
listbox_get_current (WListbox * l, char **string, void **extra)
|
||||||
{
|
{
|
||||||
WLEntry *e;
|
WLEntry *e = NULL;
|
||||||
gboolean ok;
|
gboolean ok;
|
||||||
|
|
||||||
e = listbox_get_nth_item (l, l->pos);
|
if (l != NULL)
|
||||||
|
e = listbox_get_nth_item (l, l->pos);
|
||||||
|
|
||||||
ok = (e != NULL);
|
ok = (e != NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user