mirror of https://github.com/MidnightCommander/mc
Ticket #1996: ViewContinueSearch segfault on empty search
Steps to reproduce: 1. F7, 2. set empty search string, 3. enter 4. n 5. enter 6. n Fix issue: set view->last_search_string to NULL after call g_free() Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
a394ec47f1
commit
f9b956b483
|
@ -110,6 +110,7 @@ mcview_continue_search_cmd (mcview_t * view)
|
|||
if (!view->search) {
|
||||
/* if not... then ask for an expression */
|
||||
g_free(view->last_search_string);
|
||||
view->last_search_string = NULL;
|
||||
mcview_search (view);
|
||||
} else {
|
||||
view->search->search_type = view->search_type;
|
||||
|
@ -124,6 +125,7 @@ mcview_continue_search_cmd (mcview_t * view)
|
|||
} else {
|
||||
/* if not... then ask for an expression */
|
||||
g_free(view->last_search_string);
|
||||
view->last_search_string = NULL;
|
||||
mcview_search (view);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue