]> git.mxchange.org Git - simgear.git/commitdiff
pkg: Fix recursion in Install destructor.
authorThomas Geymayer <tomgey@gmail.com>
Thu, 12 Jun 2014 21:21:56 +0000 (23:21 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 12 Jun 2014 21:21:56 +0000 (23:21 +0200)
Prevent creating a shared pointer from this in
destructor, which would lead to recursively
calling the descructor.

simgear/package/Catalog.cxx
simgear/package/Catalog.hxx

index 49b5acf4f1186b03fac54848db38fd50d183d52c..9d5f4ac78f2c368e73a252d24d8e1f90843e86ea 100644 (file)
@@ -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;
index 4804af05d7972744d1b523b46e7b2d4ee3faaccf..1d06b9bea60485642b33684da3faa5fe8f94e640 100644 (file)
@@ -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);