RT crashes when pasting nothing, fixes #3922
This commit is contained in:
@@ -8473,25 +8473,20 @@ PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue)
|
||||
pparams = nullptr;
|
||||
pedited = nullptr;
|
||||
}
|
||||
ownsPparams = ownsPedited = true;
|
||||
}
|
||||
|
||||
PartialProfile::PartialProfile(ProcParams* pp, ParamsEdited* pe, bool fullCopy)
|
||||
{
|
||||
if (fullCopy && pp) {
|
||||
pparams = new ProcParams(*pp);
|
||||
ownsPparams = true;
|
||||
} else {
|
||||
pparams = pp;
|
||||
ownsPparams = false;
|
||||
}
|
||||
|
||||
if (fullCopy && pe) {
|
||||
pedited = new ParamsEdited(*pe);
|
||||
ownsPedited = true;
|
||||
} else {
|
||||
pedited = pe;
|
||||
ownsPedited = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8508,15 +8503,6 @@ PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe)
|
||||
} else {
|
||||
pedited = nullptr;
|
||||
}
|
||||
ownsPparams = ownsPedited = true;
|
||||
}
|
||||
|
||||
PartialProfile::~PartialProfile()
|
||||
{
|
||||
if(ownsPparams)
|
||||
delete pparams;
|
||||
if(ownsPedited)
|
||||
delete pedited;
|
||||
}
|
||||
|
||||
int PartialProfile::load (const Glib::ustring &fName)
|
||||
|
||||
Reference in New Issue
Block a user