(svn r13161) -Fix: free the blitter list when the last blitter is removed.

This commit is contained in:
glx 2008-05-18 12:47:08 +00:00
parent fc4393dcfe
commit e82bab5323

View File

@ -56,7 +56,13 @@ public:
name(NULL) name(NULL)
{} {}
virtual ~BlitterFactoryBase() { if (this->name != NULL) GetBlitters().erase(this->name); free(this->name); } virtual ~BlitterFactoryBase()
{
if (this->name == NULL) return;
GetBlitters().erase(this->name);
if (GetBlitters().empty()) delete &GetBlitters();
free(this->name);
}
/** /**
* Find the requested blitter and return his class. * Find the requested blitter and return his class.