From: James Turner Date: Wed, 30 Mar 2016 16:09:33 +0000 (+0100) Subject: Guard against disabling a not-yet-active catalog. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=177c5ec709810c534b0bd8da4c1a1175d9b414d7;p=simgear.git Guard against disabling a not-yet-active catalog. --- diff --git a/simgear/package/Root.cxx b/simgear/package/Root.cxx index 7f2e8ea8..c158dbdd 100644 --- a/simgear/package/Root.cxx +++ b/simgear/package/Root.cxx @@ -532,8 +532,10 @@ void Root::catalogRefreshStatus(CatalogRef aCat, Delegate::StatusCode aReason) } // and remove it from the active collection - d->catalogs.erase(catIt); - } + if (catIt != d->catalogs.end()) { + d->catalogs.erase(catIt); + } + } // of catalog has errors case if (d->refreshing.empty()) { d->fireRefreshStatus(CatalogRef(), Delegate::STATUS_REFRESHED);