]> 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>
Fri, 14 Dec 2018 04:31:15 +0000 (23:31 -0500)
commita8ad4002a06a42d395de2595c5c3254256bccd10
treef73501029f8d94bce15d4e1453bc0dd81fb26f85
parent7950ace3d96543e3099aa3bde823f970a1ce6a86
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.

(cherry picked from commit 131f4b92bac3ecb75b47c266dfa3d8543bd4d578)
src/insets/RenderPreview.cpp
src/support/FileMonitor.cpp
src/support/FileMonitor.h