mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #4213: workaround to avoid crash on FreeBSD.
Previous fix 443a8106f1
makes the command line inaccessible if mc runs with
disabled subshell (mc -u).
This commit fixes the command line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
7ef1925a98
commit
0e6721c32b
@ -978,13 +978,13 @@ setup_cmdline (void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef ENABLE_SUBSHELL
|
#ifdef ENABLE_SUBSHELL
|
||||||
/* Workaround: avoid crash on FreeBSD (see ticket #4213 for details) */
|
|
||||||
if (subshell_prompt == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mc_global.tty.use_subshell)
|
if (mc_global.tty.use_subshell)
|
||||||
{
|
{
|
||||||
tmp_prompt = g_string_free (subshell_prompt, FALSE);
|
/* Workaround: avoid crash on FreeBSD (see ticket #4213 for details) */
|
||||||
|
if (subshell_prompt != NULL)
|
||||||
|
tmp_prompt = g_string_free (subshell_prompt, FALSE);
|
||||||
|
else
|
||||||
|
tmp_prompt = g_strdup (mc_prompt);
|
||||||
(void) strip_ctrl_codes (tmp_prompt);
|
(void) strip_ctrl_codes (tmp_prompt);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user