From: Christoph Sommer Date: Fri, 27 Jun 2008 15:45:33 +0000 (+0000) Subject: No more segfaults when trying to spawn bullets of unknown type X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a2f888ab04304eeb589e60ad1b17c86f3a2ae957;p=supertux.git No more segfaults when trying to spawn bullets of unknown type SVN-Revision: 5635 --- diff --git a/src/object/bullet.cpp b/src/object/bullet.cpp index c761735d5..30e6dfaa0 100644 --- a/src/object/bullet.cpp +++ b/src/object/bullet.cpp @@ -44,6 +44,10 @@ Bullet::Bullet(const Vector& pos, float xm, int dir, BonusType type) } else if(type == ICE_BONUS) { life_count = 10; sprite.reset(sprite_manager->create("images/objects/bullets/icebullet.sprite")); + } else { + log_warning << "Bullet::Bullet called with unknown BonusType" << std::endl; + life_count = 10; + sprite.reset(sprite_manager->create("images/objects/bullets/firebullet.sprite")); } bbox.set_pos(pos);