mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Moved freeing of data stored in HUD message objects to OnDestroy() function
https://forum.zdoom.org/viewtopic.php?t=57163
This commit is contained in:
parent
ddd1b629c3
commit
2e33165edf
2 changed files with 3 additions and 2 deletions
|
@ -150,7 +150,7 @@ DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int h
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
DHUDMessage::~DHUDMessage ()
|
void DHUDMessage::OnDestroy()
|
||||||
{
|
{
|
||||||
if (Lines)
|
if (Lines)
|
||||||
{
|
{
|
||||||
|
@ -164,6 +164,7 @@ DHUDMessage::~DHUDMessage ()
|
||||||
if (SourceText != NULL)
|
if (SourceText != NULL)
|
||||||
{
|
{
|
||||||
delete[] SourceText;
|
delete[] SourceText;
|
||||||
|
SourceText = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class DHUDMessage : public DObject
|
||||||
public:
|
public:
|
||||||
DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
|
||||||
EColorRange textColor, float holdTime);
|
EColorRange textColor, float holdTime);
|
||||||
virtual ~DHUDMessage ();
|
virtual void OnDestroy () override;
|
||||||
|
|
||||||
virtual void Serialize(FSerializer &arc);
|
virtual void Serialize(FSerializer &arc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue