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

Make sure that agenda is not null

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