(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
1 changed files with 7 additions and 1 deletions

View File

@ -56,7 +56,13 @@ public:
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.