]> git.lyx.org Git - features.git/commit
Fix segfault after deleting monitor
authorGuillaume MM <gm@lyx.org>
Tue, 13 Nov 2018 22:10:35 +0000 (23:10 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:51 +0000 (14:39 +0200)
commit1ead6b4be8d28f007268b3ab6f4e416963dd9f3a
tree0080f0129612f47377fe26b5e842994996919763
parent66effbea308c491f2f59b00cedf25223ce6ae13c
Fix segfault after deleting monitor

The boost signal was sent synchronously, and so made the Qt signal to be posted
in FileMonitor::changed after the boost signal returned, so after the sender was
possibly destroyed.

The solution is to make the boost signal asynchronous using the Qt event loop.

Thanks to Scott Kostyshak for the report and MWE.
src/insets/RenderPreview.cpp
src/support/FileMonitor.cpp
src/support/FileMonitor.h