Skip to content

Commit

Permalink
Don't draw bounding box of destroyed object
Browse files Browse the repository at this point in the history
  • Loading branch information
hubol committed Jan 6, 2024
1 parent ae2a798 commit 7fdef05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/game-engine/debug/debug-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function objDisplayObjectMonitor() {

const gfx = new Graphics().step(() => {
gfx.clear();
if (!displayObject)
if (!displayObject || displayObject.destroyed)
return;

displayObject.getBounds(false, r);
Expand Down

0 comments on commit 7fdef05

Please sign in to comment.