Skip to content

Commit 1debf53

Browse files
Merge pull request #644 from ganhailin/fix/crash
Fix crash on drag and drop file to Playlist
2 parents 18b1c69 + bc66638 commit 1debf53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

YUViewLib/src/ui/widgets/PlaylistTreeWidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ void PlaylistTreeWidget::dragMoveEvent(QDragMoveEvent *event)
194194
if (dropTarget)
195195
{
196196
auto draggedItems = selectedItems();
197+
if (draggedItems.size() <= 0){
198+
event->ignore();
199+
return;
200+
}
197201
auto draggedItem = dynamic_cast<playlistItem *>(draggedItems[0]);
198202

199203
// handle video items as target

0 commit comments

Comments
 (0)