[LyX/master] Do not use a version of dispatch() that use a DispatchResult if not using it

Pavel Sanda sanda at lyx.org
Mon May 19 08:28:31 UTC 2025


On Sun, May 11, 2025 at 06:28:51PM +0000, Jean-Marc Lasgouttes wrote:
> commit cd3d32736644477bcd6c3aac66cb197e366f168b
> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> Date:   Sun May 11 20:23:00 2025 +0200
> 
>     Do not use a version of dispatch() that use a DispatchResult if not using it
>     
>     There are basically two types of dispatch functions. Those which have
>     no DispatchResult parameter clean up after themselves and do whatever
>     updates have been requested.
>     
>     On the other hand, those with a DispatchResult prameter expect to be
>     part of a larger dispatch() chain and modify the DR that is passed to
>     them so that it is taken into account.
>     
>     tl;dr: never declare a DR variable if you do not intend to do
>     something with it after calling dispatch.

Riki, irrespective ongoing debates in #13162, this is good candidate
for fixing the crash and should be backported. Ok?

Pavel


More information about the lyx-devel mailing list