Fixed crash when deleting a card from a non-empty set.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@396 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-05-19 16:53:15 +00:00
parent 32b3f86cc3
commit 8aef0b244b
+2 -1
View File
@@ -199,7 +199,8 @@ void CardsPanel::onCommand(int id) {
set->actions.add(new AddCardAction(*set));
break;
case ID_CARD_REMOVE:
set->actions.add(new RemoveCardAction(*set, card_list->getCard()));
if (card_list->getCard() != nullptr)
set->actions.add(new RemoveCardAction(*set, card_list->getCard()));
break;
case ID_CARD_ROTATE:
case ID_CARD_ROTATE_0: case ID_CARD_ROTATE_90: case ID_CARD_ROTATE_180: case ID_CARD_ROTATE_270: {