mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.3478: still crash with error in :catch and also in :finally
Problem: Still crash with error in :catch and also in :finally. Solution: Only call finish_exception() once. (closes #8954)
This commit is contained in:
@@ -2401,8 +2401,12 @@ cleanup_conditionals(
|
||||
if (!(cstack->cs_flags[idx] & CSF_FINALLY))
|
||||
{
|
||||
if ((cstack->cs_flags[idx] & CSF_ACTIVE)
|
||||
&& (cstack->cs_flags[idx] & CSF_CAUGHT))
|
||||
&& (cstack->cs_flags[idx] & CSF_CAUGHT)
|
||||
&& !(cstack->cs_flags[idx] & CSF_FINISHED))
|
||||
{
|
||||
finish_exception((except_T *)cstack->cs_exception[idx]);
|
||||
cstack->cs_flags[idx] |= CSF_FINISHED;
|
||||
}
|
||||
// Stop at this try conditional - except the try block never
|
||||
// got active (because of an inactive surrounding conditional
|
||||
// or when the ":try" appeared after an error or interrupt or
|
||||
|
Reference in New Issue
Block a user