When specifying empty condition in the where condition the code pointed (#61)
to uninitialized memory in the conditionalphrase.cpp 115 line. This patch fixes it.
This commit is contained in:
parent
e062b49830
commit
3ca99e372b
|
|
@ -112,7 +112,8 @@ ConditionalPhrase::~ConditionalPhrase()
|
|||
ConditionalPhrase &ConditionalPhrase::operator =(const ConditionalPhrase &other)
|
||||
{
|
||||
data = other.data;
|
||||
data->parents++;
|
||||
if (data)
|
||||
data->parents++;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ConditionalPhrase operator op(const QVariant &other) \
|
|||
class NUT_EXPORT ConditionalPhrase
|
||||
{
|
||||
public:
|
||||
PhraseData *data;
|
||||
PhraseData *data = nullptr;
|
||||
// QSharedPointer<PhraseData> leftDataPointer;
|
||||
// QSharedPointer<PhraseData> rightDataPointer;
|
||||
ConditionalPhrase();
|
||||
|
|
|
|||
Loading…
Reference in New Issue