mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r13161) -Fix: free the blitter list when the last blitter is removed.
This commit is contained in:
parent
fc4393dcfe
commit
e82bab5323
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user