mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #4213: workaround to avoid crash on FreeBSD.
In the read_subshell_prompt() (src/subshell/common.c:1546) the first call of select() returns 0. Therefore subshell_prompt is NULL. NULL dereference is the cause of crash. This commit isn't a real fix but just a workaround. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b870f16b0d
commit
443a8106f1
@ -978,6 +978,10 @@ setup_cmdline (void)
|
||||
return;
|
||||
|
||||
#ifdef ENABLE_SUBSHELL
|
||||
/* Workaround: avoid crash on FreeBSD (see ticket #4213 for details) */
|
||||
if (subshell_prompt == NULL)
|
||||
return;
|
||||
|
||||
if (mc_global.tty.use_subshell)
|
||||
{
|
||||
tmp_prompt = g_string_free (subshell_prompt, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user