Commit 6a245bc9 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix uninitialized pointer field

CID:249039
parent ab9fa227
......@@ -23,25 +23,21 @@
KisFreehandStrokeInfo::KisFreehandStrokeInfo()
: painter(new KisPainter()),
dragDistance(new KisDistanceInformation()),
m_parentStrokeInfo(0),
m_childStrokeInfo(0)
: painter(new KisPainter())
, dragDistance(new KisDistanceInformation())
{
}
KisFreehandStrokeInfo::KisFreehandStrokeInfo(const KisDistanceInformation &startDist)
: painter(new KisPainter()),
dragDistance(new KisDistanceInformation(startDist)),
m_parentStrokeInfo(0),
m_childStrokeInfo(0)
: painter(new KisPainter())
, dragDistance(new KisDistanceInformation(startDist))
{
}
KisFreehandStrokeInfo::KisFreehandStrokeInfo(KisFreehandStrokeInfo *rhs, int levelOfDetail)
: painter(new KisPainter()),
dragDistance(new KisDistanceInformation(*rhs->dragDistance, levelOfDetail)),
m_parentStrokeInfo(rhs)
: painter(new KisPainter())
, dragDistance(new KisDistanceInformation(*rhs->dragDistance, levelOfDetail))
, m_parentStrokeInfo(rhs)
{
rhs->m_childStrokeInfo = this;
}
......
......@@ -48,8 +48,8 @@ public:
KisDistanceInformation* buddyDragDistance();
private:
KisFreehandStrokeInfo *m_parentStrokeInfo;
KisFreehandStrokeInfo *m_childStrokeInfo;
KisFreehandStrokeInfo *m_parentStrokeInfo {0};
KisFreehandStrokeInfo *m_childStrokeInfo {0};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment