diff --git a/simgear/package/Root.cxx b/simgear/package/Root.cxx index 49925cbe..983729fb 100755 --- a/simgear/package/Root.cxx +++ b/simgear/package/Root.cxx @@ -133,7 +133,9 @@ public: void fireRefreshStatus(CatalogRef catalog, Delegate::StatusCode status) { - for (auto d : delegates) { + // take a copy of delegates since firing this can modify the data + const auto currentDelegates = delegates; + for (auto d : currentDelegates) { d->catalogRefreshed(catalog, status); } }