mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
(mcview_continue_search_cmd): clarify handling of NULL item of history.
This commit is contained in:
parent
6adcd57859
commit
288fe62987
@ -141,8 +141,9 @@ mcview_continue_search_cmd (WView * view)
|
||||
GList *history;
|
||||
|
||||
history = mc_config_history_get (MC_HISTORY_SHARED_SEARCH);
|
||||
if (history != NULL && history->data != NULL)
|
||||
if (history != NULL)
|
||||
{
|
||||
/* FIXME: is it possible that history->data == NULL? */
|
||||
view->last_search_string = (gchar *) history->data;
|
||||
history->data = NULL;
|
||||
history = g_list_first (history);
|
||||
@ -153,10 +154,12 @@ mcview_continue_search_cmd (WView * view)
|
||||
mcview_search (view, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* found, but cannot init search */
|
||||
MC_PTR_FREE (view->last_search_string);
|
||||
}
|
||||
|
||||
/* if not... then ask for an expression */
|
||||
MC_PTR_FREE (view->last_search_string);
|
||||
mcview_search (view, TRUE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user