mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r13161) -Fix: free the blitter list when the last blitter is removed.
This commit is contained in:
parent
4d5b9e38d6
commit
ca27e25ab0
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user