From b5d21dadd01077b9ba00accdc0ef1895edab31a9 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 16 Apr 2019 00:09:41 +0200 Subject: [PATCH] Fixed a segfault in an application test. --- src/lay/lay/layMacroController.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lay/lay/layMacroController.cc b/src/lay/lay/layMacroController.cc index 202e91756..28dde80c9 100644 --- a/src/lay/lay/layMacroController.cc +++ b/src/lay/lay/layMacroController.cc @@ -834,10 +834,12 @@ add_collections_to_file_watcher (const lym::MacroCollection &collection, tl::Fil void MacroController::sync_file_watcher () { - m_file_watcher->clear (); - m_file_watcher->enable (false); - add_collections_to_file_watcher (lym::MacroCollection::root (), m_file_watcher); - m_file_watcher->enable (true); + if (m_file_watcher) { + m_file_watcher->clear (); + m_file_watcher->enable (false); + add_collections_to_file_watcher (lym::MacroCollection::root (), m_file_watcher); + m_file_watcher->enable (true); + } } void