(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 4d5b9e38d6
commit ca27e25ab0

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.