QScopedPointer removes QDrag to early and will still be accessed in another thread. #1

This commit is contained in:
Pascal Sander
2025-08-13 20:01:22 +02:00
parent 0f179a5d49
commit dad637689d

View File

@@ -82,7 +82,11 @@ void ElementsTreeView::startElementDrag(const ElementsLocation &location)
{
if (! location.exist()) return;
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
QDrag* drag = new QDrag(this);
#else
QScopedPointer<QDrag> drag(new QDrag(this));
#endif
QString location_str = location.toString();
QMimeData *mime_data = new QMimeData();