From e8f10dd2e8a07a71d8db31cb1299b7c369464c6a Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Thu, 12 Jun 2014 23:21:56 +0200 Subject: [PATCH] pkg: Fix recursion in Install destructor. Prevent creating a shared pointer from this in destructor, which would lead to recursively calling the descructor. --- simgear/package/Catalog.cxx | 4 ++-- simgear/package/Catalog.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/simgear/package/Catalog.cxx b/simgear/package/Catalog.cxx index 49b5acf4..9d5f4ac7 100644 --- a/simgear/package/Catalog.cxx +++ b/simgear/package/Catalog.cxx @@ -356,7 +356,7 @@ void Catalog::refreshComplete(Delegate::FailureCode aReason) m_root->catalogRefreshComplete(this, aReason); } -void Catalog::registerInstall(InstallRef ins) +void Catalog::registerInstall(Install* ins) { if (!ins || ins->package()->catalog() != this) { return; @@ -365,7 +365,7 @@ void Catalog::registerInstall(InstallRef ins) m_installed[ins->package()] = ins; } -void Catalog::unregisterInstall(InstallRef ins) +void Catalog::unregisterInstall(Install* ins) { if (!ins || ins->package()->catalog() != this) { return; diff --git a/simgear/package/Catalog.hxx b/simgear/package/Catalog.hxx index 4804af05..1d06b9be 100644 --- a/simgear/package/Catalog.hxx +++ b/simgear/package/Catalog.hxx @@ -124,8 +124,8 @@ private: friend class Downloader; friend class Install; - void registerInstall(InstallRef ins); - void unregisterInstall(InstallRef ins); + void registerInstall(Install* ins); + void unregisterInstall(Install* ins); void parseProps(const SGPropertyNode* aProps); -- 2.39.5