try fix crash on Note::drag

This commit is contained in:
Igor Korsukov 2020-03-21 12:49:14 +02:00
parent 2014923958
commit 33675a8fa6

View file

@ -2354,6 +2354,9 @@ void Note::startDrag(EditData& ed)
QRectF Note::drag(EditData& ed)
{
NoteEditData* noteEditData = static_cast<NoteEditData*>(ed.getData(this));
IF_ASSERT_FAILED(noteEditData) {
return QRectF();
}
QPointF delta = ed.pos - ed.lastPos;
noteEditData->delta = delta;