Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0330ab1a authored by Laurent Montel's avatar Laurent Montel 😁

Make sure that agenda is not null

CCBUG: 384324
parent 40da7ea3
......@@ -174,6 +174,9 @@ void TimeLabels::setAgenda(Agenda *agenda)
/** This is called in response to repaint() */
void TimeLabels::paintEvent(QPaintEvent *)
{
if (!mAgenda) {
return;
}
QPainter p(this);
const int ch = height();
......
......@@ -87,10 +87,10 @@ private:
int mRows;
double mCellHeight;
int mMiniWidth;
Agenda *mAgenda;
TimeLabelsZone *mTimeLabelsZone;
Agenda *mAgenda = nullptr;
TimeLabelsZone *mTimeLabelsZone = nullptr;
QFrame *mMousePos; // shows a marker for the current mouse position in y direction
QFrame *mMousePos = nullptr; // shows a marker for the current mouse position in y direction
};
}
......
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