Fix piece carrousel context menu crash
This commit is contained in:
parent
b9e26f0b3f
commit
728b2c83c3
|
@ -187,6 +187,8 @@ void VPCarrouselPieceList::dragMoveEvent(QDragMoveEvent* e)
|
|||
void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QListWidgetItem* _item = currentItem();
|
||||
if(_item != nullptr)
|
||||
{
|
||||
if(_item->type() == 1001)
|
||||
{
|
||||
VPCarrouselPiece *pieceItem = static_cast<VPCarrouselPiece *> (_item);
|
||||
|
@ -221,6 +223,7 @@ void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
contextMenu.exec(event->globalPos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user