]> 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)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 4 Dec 2018 05:05:01 +0000 (00:05 -0500)
commit131f4b92bac3ecb75b47c266dfa3d8543bd4d578
tree0080f0129612f47377fe26b5e842994996919763
parentbd21aa99d244cbfe532c4d970197a940355828dd
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