mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-09 20:04:09 +03:00
Ticket #2299: history can be shown incorrectly due to access to the invalid pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
44459c19f6
commit
5cccff75fb
@ -1492,12 +1492,12 @@ show_hist (GList ** history, Widget * widget)
|
||||
entry->text = NULL;
|
||||
}
|
||||
|
||||
destroy_dlg (query_dlg);
|
||||
|
||||
/* restore history direction */
|
||||
if (query_dlg->y < widget->y)
|
||||
z = g_list_reverse (z);
|
||||
|
||||
destroy_dlg (query_dlg);
|
||||
|
||||
g_list_foreach (*history, (GFunc) g_free, NULL);
|
||||
g_list_free (*history);
|
||||
*history = g_list_last (z);
|
||||
|
Loading…
x
Reference in New Issue
Block a user