Skip to content

Commit ebc50cd

Browse files
committed
MovingSprite: Check if action exists before setting it
1 parent d6609a2 commit ebc50cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/object/moving_sprite.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ MovingSprite::after_editor_set()
216216
{
217217
change_sprite(get_default_sprite_name());
218218
}
219-
m_sprite->set_action(current_action);
219+
if (m_sprite->has_action(current_action))
220+
{
221+
m_sprite->set_action(current_action);
222+
}
220223

221224
update_hitbox();
222225
}

0 commit comments

Comments
 (0)