pkg: Fix recursion in Install destructor.
Prevent creating a shared pointer from this in destructor, which would lead to recursively calling the descructor.
This commit is contained in:
parent
edbfbd769e
commit
e8f10dd2e8
@ -356,7 +356,7 @@ void Catalog::refreshComplete(Delegate::FailureCode aReason)
|
|||||||
m_root->catalogRefreshComplete(this, aReason);
|
m_root->catalogRefreshComplete(this, aReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Catalog::registerInstall(InstallRef ins)
|
void Catalog::registerInstall(Install* ins)
|
||||||
{
|
{
|
||||||
if (!ins || ins->package()->catalog() != this) {
|
if (!ins || ins->package()->catalog() != this) {
|
||||||
return;
|
return;
|
||||||
@ -365,7 +365,7 @@ void Catalog::registerInstall(InstallRef ins)
|
|||||||
m_installed[ins->package()] = ins;
|
m_installed[ins->package()] = ins;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Catalog::unregisterInstall(InstallRef ins)
|
void Catalog::unregisterInstall(Install* ins)
|
||||||
{
|
{
|
||||||
if (!ins || ins->package()->catalog() != this) {
|
if (!ins || ins->package()->catalog() != this) {
|
||||||
return;
|
return;
|
||||||
|
@ -124,8 +124,8 @@ private:
|
|||||||
friend class Downloader;
|
friend class Downloader;
|
||||||
|
|
||||||
friend class Install;
|
friend class Install;
|
||||||
void registerInstall(InstallRef ins);
|
void registerInstall(Install* ins);
|
||||||
void unregisterInstall(InstallRef ins);
|
void unregisterInstall(Install* ins);
|
||||||
|
|
||||||
void parseProps(const SGPropertyNode* aProps);
|
void parseProps(const SGPropertyNode* aProps);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user