Fixed a segfault in an application test.

This commit is contained in:
Matthias Koefferlein 2019-04-16 00:09:41 +02:00
parent eabf558186
commit b5d21dadd0
1 changed files with 6 additions and 4 deletions

View File

@ -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