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:
Andrew Borodin 2014-01-22 13:59:54 +04:00
parent d26b7dd6ee
commit 62e1606106
1 changed files with 3 additions and 2 deletions

View File

@ -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);