mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Fix crash when dropping comics in sublists
This commit is contained in:
@ -218,8 +218,13 @@ bool ReadingListModel::canDropMimeData(const QMimeData *data, Qt::DropAction act
|
||||
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||
QDataStream in(&rawData, QIODevice::ReadOnly);
|
||||
in >> sublistsRows; // deserialize the list of indentifiers
|
||||
|
||||
if (sublistsRows.isEmpty())
|
||||
return false;
|
||||
|
||||
if (parent.row() != sublistsRows.at(0).second)
|
||||
return false;
|
||||
|
||||
return data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user