From: Ricardo Cruz Date: Thu, 9 Sep 2004 10:40:42 +0000 (+0000) Subject: Do not free mirror surfaces. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d1358d551f2415de1495c9f55916787721f42f82;p=supertux.git Do not free mirror surfaces. SVN-Revision: 1885 --- diff --git a/lib/special/sprite.cpp b/lib/special/sprite.cpp index 100634b06..d713d5fd2 100644 --- a/lib/special/sprite.cpp +++ b/lib/special/sprite.cpp @@ -55,7 +55,10 @@ Sprite::~Sprite() { for(std::vector::iterator i_sur = i_act->second->surfaces.begin(); i_sur != i_act->second->surfaces.end(); ++i_sur) - delete *i_sur; + { + if(!i_act->second->mirror) + delete *i_sur; + } delete i_act->second; } } @@ -106,7 +109,7 @@ Sprite::parse_action(LispReader& lispreader) { std::vector images; if(!lispreader.read_string_vector("images", images)) - Termination::abort("Sprite contains no images: ", action->name.c_str()); + Termination::abort("Sprite contains no images: ", action->name); for(std::vector::size_type i = 0; i < images.size(); i++) {