mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 04:34:16 +01:00
Fix: no need to guard free()
This commit is contained in:
@@ -63,7 +63,7 @@ Font::Font(FontSize size, TextColour colour) :
|
||||
template <typename T>
|
||||
static inline void GetLayouter(Layouter::LineCacheItem &line, std::string_view str, FontState &state)
|
||||
{
|
||||
if (line.buffer != nullptr) free(line.buffer);
|
||||
free(line.buffer);
|
||||
|
||||
typename T::CharType *buff_begin = MallocT<typename T::CharType>(str.size() + 1);
|
||||
const typename T::CharType *buffer_last = buff_begin + str.size() + 1;
|
||||
|
||||
Reference in New Issue
Block a user