add a nulcheck in the card item animation timer (#6740)

This commit is contained in:
ebbit1q 2026-03-27 18:08:51 +01:00 committed by GitHub
parent 74cce5ccb2
commit abf6e72ad1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -460,6 +460,9 @@ void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
bool CardItem::animationEvent() bool CardItem::animationEvent()
{ {
if (owner == nullptr) {
return false;
}
int rotation = ROTATION_DEGREES_PER_FRAME; int rotation = ROTATION_DEGREES_PER_FRAME;
bool animationIncomplete = true; bool animationIncomplete = true;
if (!tapped) if (!tapped)