diff --git a/src/piechart/piechartitem_p.h b/src/piechart/piechartitem_p.h index b020e46..68f0e37 100644 --- a/src/piechart/piechartitem_p.h +++ b/src/piechart/piechartitem_p.h @@ -33,6 +33,7 @@ #include "qpieseries.h" #include "chartitem_p.h" #include "piesliceitem_p.h" +#include class QGraphicsItem; QTCOMMERCIALCHART_BEGIN_NAMESPACE @@ -71,7 +72,7 @@ private: private: QHash m_sliceItems; - QPieSeries *m_series; + QPointer m_series; QRectF m_rect; QPointF m_pieCenter; qreal m_pieRadius; diff --git a/src/piechart/qpieseries.cpp b/src/piechart/qpieseries.cpp index 13172a1..3a806cf 100644 --- a/src/piechart/qpieseries.cpp +++ b/src/piechart/qpieseries.cpp @@ -362,6 +362,7 @@ QPieSeries::QPieSeries(QObject *parent) QPieSeries::~QPieSeries() { // NOTE: d_prt destroyed by QObject + clear(); } /*!