Fix potential memory issues.

This commit is contained in:
F_Chao Fengchao 2024-05-24 15:25:28 +08:00 committed by Devin Lin
parent fddf5e9f31
commit 60fa46e2dc

View file

@ -776,7 +776,7 @@ bool DragState::createDropPositionDelegate()
int column = m_candidateDropPosition->pageColumn(); int column = m_candidateDropPosition->pageColumn();
// delegate to add // delegate to add
FolioPageDelegate *delegate = new FolioPageDelegate{row, column, m_dropDelegate, page}; FolioPageDelegate *delegate = new FolioPageDelegate{row, column, m_dropDelegate, PageListModel::self()};
// delegate that exists at the drop position // delegate that exists at the drop position
FolioPageDelegate *existingDelegate = page->getDelegate(row, column); FolioPageDelegate *existingDelegate = page->getDelegate(row, column);