RT crashes when pasting nothing, fixes #3922
This commit is contained in:
parent
a6cf24bc13
commit
014ff692c5
@ -8473,25 +8473,20 @@ PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue)
|
|||||||
pparams = nullptr;
|
pparams = nullptr;
|
||||||
pedited = nullptr;
|
pedited = nullptr;
|
||||||
}
|
}
|
||||||
ownsPparams = ownsPedited = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PartialProfile::PartialProfile(ProcParams* pp, ParamsEdited* pe, bool fullCopy)
|
PartialProfile::PartialProfile(ProcParams* pp, ParamsEdited* pe, bool fullCopy)
|
||||||
{
|
{
|
||||||
if (fullCopy && pp) {
|
if (fullCopy && pp) {
|
||||||
pparams = new ProcParams(*pp);
|
pparams = new ProcParams(*pp);
|
||||||
ownsPparams = true;
|
|
||||||
} else {
|
} else {
|
||||||
pparams = pp;
|
pparams = pp;
|
||||||
ownsPparams = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullCopy && pe) {
|
if (fullCopy && pe) {
|
||||||
pedited = new ParamsEdited(*pe);
|
pedited = new ParamsEdited(*pe);
|
||||||
ownsPedited = true;
|
|
||||||
} else {
|
} else {
|
||||||
pedited = pe;
|
pedited = pe;
|
||||||
ownsPedited = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8508,15 +8503,6 @@ PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe)
|
|||||||
} else {
|
} else {
|
||||||
pedited = nullptr;
|
pedited = nullptr;
|
||||||
}
|
}
|
||||||
ownsPparams = ownsPedited = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
PartialProfile::~PartialProfile()
|
|
||||||
{
|
|
||||||
if(ownsPparams)
|
|
||||||
delete pparams;
|
|
||||||
if(ownsPedited)
|
|
||||||
delete pedited;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int PartialProfile::load (const Glib::ustring &fName)
|
int PartialProfile::load (const Glib::ustring &fName)
|
||||||
|
@ -1435,15 +1435,11 @@ public:
|
|||||||
PartialProfile (bool createInstance = false, bool paramsEditedValue = false);
|
PartialProfile (bool createInstance = false, bool paramsEditedValue = false);
|
||||||
PartialProfile (ProcParams* pp, ParamsEdited* pe = nullptr, bool fullCopy = false);
|
PartialProfile (ProcParams* pp, ParamsEdited* pe = nullptr, bool fullCopy = false);
|
||||||
PartialProfile (const ProcParams* pp, const ParamsEdited* pe = nullptr);
|
PartialProfile (const ProcParams* pp, const ParamsEdited* pe = nullptr);
|
||||||
~PartialProfile ();
|
|
||||||
void deleteInstance ();
|
void deleteInstance ();
|
||||||
void clearGeneral ();
|
void clearGeneral ();
|
||||||
int load (const Glib::ustring &fName);
|
int load (const Glib::ustring &fName);
|
||||||
void set (bool v);
|
void set (bool v);
|
||||||
const void applyTo (ProcParams *destParams) const ;
|
const void applyTo (ProcParams *destParams) const ;
|
||||||
private:
|
|
||||||
bool ownsPparams;
|
|
||||||
bool ownsPedited;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user