]> git.lyx.org Git - lyx.git/commit
Fix crash with info inset and dialogs
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Feb 2023 20:34:08 +0000 (21:34 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 6 Feb 2023 20:34:08 +0000 (21:34 +0100)
commit17e60e2e8559e5b702189c82a5a746b9f41cd219
tree694b60e6717795b9d1a00787fe4a7a23d5bdcef4
parent04ece4f0d6af818b3bc572b558181b947a109580
Fix crash with info inset and dialogs

See the thread
  2.4 Crash (was: Updated LaTeXConfig.lyx (bxjsclasses added))
on lyx-devel (26/01/2023).

The backtrace imply a problem like:
1/ metrics are computed for some info inset
2/ the info inset is regenerated (and thus the paragraph it held is now invalid)
3/ We draw the inset and because of the new (disabled by default)
   bookmark display code, we access the id() of the invalid paragraph.
4/ boom!

To fix the issue, introduce a new boolean member that indicates when
the Row object of the metrics should not be used. In this case, the
draw() method returns early.
src/insets/InsetInfo.cpp
src/insets/InsetInfo.h