Skip to content

Commit c16df87

Browse files
committed
Sprite: Return position in boundingRect() if there are no costumes
1 parent 350c8c3 commit c16df87

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scratch/sprite_p.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ void SpritePrivate::getBoundingRect(Rect *out) const
4343
auto costume = sprite->costumeAt(sprite->currentCostume() - 1);
4444

4545
if (!costume) {
46-
out->setLeft(0);
47-
out->setTop(0);
48-
out->setRight(0);
49-
out->setBottom(0);
46+
out->setLeft(x);
47+
out->setTop(y);
48+
out->setRight(x);
49+
out->setBottom(y);
5050
return;
5151
}
5252

0 commit comments

Comments
 (0)