[LyX/master] Do not use a version of dispatch() that use a DispatchResult if not using it
Richard Kimberly Heck
rikiheck at gmail.com
Tue May 20 15:11:33 UTC 2025
On 5/19/25 4:28 AM, Pavel Sanda wrote:
> 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?
OK.
Riki
More information about the lyx-devel
mailing list