(edit_do_search): search descriptor should not be NULL.

Fix of Coverity id #110818.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-05-28 09:33:32 +03:00
parent a7b8d00535
commit 22a7ef782d

View File

@ -25,6 +25,8 @@
#include <config.h>
#include <assert.h>
#include "lib/global.h"
#include "lib/search.h"
#include "lib/mcconfig.h" /* mc_config_history_get */
@ -575,8 +577,8 @@ edit_do_search (WEdit * edit)
edit_search_status_msg_t esm;
gsize len = 0;
if (edit->search == NULL)
edit->search_start = edit->buffer.curs1;
/* This shouldn't happen */
assert (edit->search != NULL);
edit_push_undo_action (edit, KEY_PRESS + edit->start_display);