diff options
-rw-r--r-- | engines/zvision/fonts/truetype_font.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/zvision/fonts/truetype_font.cpp b/engines/zvision/fonts/truetype_font.cpp index ba4d72bde8..45eaeeb2b4 100644 --- a/engines/zvision/fonts/truetype_font.cpp +++ b/engines/zvision/fonts/truetype_font.cpp @@ -95,6 +95,7 @@ Graphics::Surface *TruetypeFont::drawTextToSurface(const Common::String &text, u lines.pop_back(); } if (lines.size() == 0) { + delete surface; return nullptr; } |