Commit 9410ea13 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

crash fix

parent fe397cd7
...@@ -107,6 +107,10 @@ CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, QGraphicsI ...@@ -107,6 +107,10 @@ CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, QGraphicsI
CardItem::~CardItem() CardItem::~CardItem()
{ {
prepareDelete(); prepareDelete();
delete cardMenu;
cardMenu = 0;
deleteDragItem(); deleteDragItem();
} }
...@@ -117,8 +121,6 @@ void CardItem::prepareDelete() ...@@ -117,8 +121,6 @@ void CardItem::prepareDelete()
owner->setCardMenu(0); owner->setCardMenu(0);
owner = 0; owner = 0;
} }
delete cardMenu;
cardMenu = 0;
while (!attachedCards.isEmpty()) { while (!attachedCards.isEmpty()) {
attachedCards.first()->setZone(0); // so that it won't try to call reorganizeCards() attachedCards.first()->setZone(0); // so that it won't try to call reorganizeCards()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment